Skip to content

Commit 841d7af

Browse files
committed
Change the test runner to work more like the webpack command line. If the hashes between two builds in watch mode match, no output is written.
1 parent a02b7eb commit 841d7af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/run.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ function createTest(test, testPath, options) {
9494
if (options.transpile) config.ts.transpileOnly = true;
9595

9696
var iteration = 0;
97+
var lastHash;
9798
var watcher = webpack(config).watch({aggregateTimeout: 1500}, function(err, stats) {
9899
var patch = '';
99100
if (iteration > 0) {
@@ -154,7 +155,9 @@ function createTest(test, testPath, options) {
154155
}
155156
}
156157

157-
if (stats) {
158+
if (stats && stats.hash != lastHash) {
159+
lastHash = stats.hash;
160+
158161
var statsFileName = 'output.txt';
159162

160163
var statsString = stats.toString({timings: false, version: false, hash: false})

0 commit comments

Comments
 (0)