mirror of https://github.com/webpack/webpack.git
change output filesystem to be in memory and linux style
This commit is contained in:
parent
8ecae31c67
commit
fcb219d968
|
|
@ -21,7 +21,9 @@ describe("Compiler", function() {
|
||||||
var c = webpack(options);
|
var c = webpack(options);
|
||||||
var files = {};
|
var files = {};
|
||||||
c.outputFileSystem = {
|
c.outputFileSystem = {
|
||||||
join: path.join.bind(path),
|
join: function() {
|
||||||
|
return [].join.call(arguments, "/").replace(/\/+/g, "/");
|
||||||
|
},
|
||||||
mkdirp: function(path, callback) {
|
mkdirp: function(path, callback) {
|
||||||
logs.mkdirp.push(path);
|
logs.mkdirp.push(path);
|
||||||
callback();
|
callback();
|
||||||
|
|
@ -55,17 +57,15 @@ describe("Compiler", function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
it("should compile a single file to deep output", function(done) {
|
it("should compile a single file to deep output", function(done) {
|
||||||
var sep = path.sep;
|
|
||||||
|
|
||||||
compile("./c", {
|
compile("./c", {
|
||||||
output: {
|
output: {
|
||||||
path: "/what",
|
path: "/what",
|
||||||
filename: "the" + sep + "hell.js",
|
filename: "the/hell.js",
|
||||||
}
|
}
|
||||||
}, function(stats, files) {
|
}, function(stats, files) {
|
||||||
stats.logs.mkdirp.should.eql([
|
stats.logs.mkdirp.should.eql([
|
||||||
"/what",
|
"/what",
|
||||||
"/what" + sep + "the",
|
"/what/the",
|
||||||
]);
|
]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue