Skip to content

Commit bd10fca

Browse files
committed
use webpack instead of Compiler in test
1 parent 53c0f68 commit bd10fca

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

test/Compiler-caching.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var path = require("path");
33
var fs = require("fs");
44

55
var NodeEnvironmentPlugin = require("../lib/node/NodeEnvironmentPlugin");
6-
var Compiler = require("../lib/Compiler");
6+
var webpack = require("../");
77
var WebpackOptionsApply = require("../lib/WebpackOptionsApply");
88
var WebpackOptionsDefaulter = require("../lib/WebpackOptionsDefaulter");
99

@@ -22,9 +22,7 @@ describe("Compiler (caching)", function() {
2222
writeFile: [],
2323
};
2424

25-
var c = new Compiler();
26-
new NodeEnvironmentPlugin().apply(c);
27-
c.options = new WebpackOptionsApply().process(options, c);
25+
var c = webpack(options);
2826
var files = {};
2927
c.outputFileSystem = {
3028
join: path.join.bind(path),

test/Compiler.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var should = require("should");
22
var path = require("path");
33

44
var NodeEnvironmentPlugin = require("../lib/node/NodeEnvironmentPlugin");
5-
var Compiler = require("../lib/Compiler");
5+
var webpack = require("../");
66
var WebpackOptionsApply = require("../lib/WebpackOptionsApply");
77
var WebpackOptionsDefaulter = require("../lib/WebpackOptionsDefaulter");
88

@@ -19,9 +19,7 @@ describe("Compiler", function() {
1919
writeFile: [],
2020
};
2121

22-
var c = new Compiler();
23-
new NodeEnvironmentPlugin().apply(c);
24-
c.options = new WebpackOptionsApply().process(options, c);
22+
var c = webpack(options);
2523
var files = {};
2624
c.outputFileSystem = {
2725
join: path.join.bind(path),

0 commit comments

Comments
 (0)