Skip to content

Commit

Permalink
remove hash from stats test with error
Browse files Browse the repository at this point in the history
because error contains an absolute path
  • Loading branch information
sokra committed Aug 11, 2017
1 parent 7905bf5 commit 09c34cf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/Compilation.js
Expand Up @@ -1185,8 +1185,8 @@ class Compilation extends Tapable {
this.warnings.forEach(function(warning) {
hash.update(`${warning.message}`);
});
this.errors.forEach(function(warning) {
hash.update(`${warning.message}`);
this.errors.forEach(function(error) {
hash.update(`${error.message}`);
});
// clone needed as sort below is inplace mutation
const chunks = this.chunks.slice();
Expand Down
3 changes: 1 addition & 2 deletions test/statsCases/module-trace-disabled-in-error/expected.txt
@@ -1,8 +1,7 @@
Hash: 96df8294017a444709b1
Time: Xms
Asset Size Chunks Chunk Names
main.js 2.65 kB 0 [emitted] main
[0] (webpack)/test/statsCases/module-trace-disabled-in-error/index.js 25 bytes {0} [built]

ERROR in (webpack)/test/statsCases/module-trace-disabled-in-error/index.js
Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/module-trace-disabled-in-error'
Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/module-trace-disabled-in-error'
@@ -1,6 +1,7 @@
module.exports = {
entry: "./index",
stats: {
hash: false,
moduleTrace: false
}
};
3 changes: 1 addition & 2 deletions test/statsCases/module-trace-enabled-in-error/expected.txt
@@ -1,9 +1,8 @@
Hash: d59adee54681f1f3ab37
Time: Xms
Asset Size Chunks Chunk Names
main.js 2.65 kB 0 [emitted] main
[0] (webpack)/test/statsCases/module-trace-enabled-in-error/index.js 25 bytes {0} [built]

ERROR in (webpack)/test/statsCases/module-trace-enabled-in-error/index.js
Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/module-trace-enabled-in-error'
@ (webpack)/test/statsCases/module-trace-enabled-in-error/index.js 1:0-25
@ (webpack)/test/statsCases/module-trace-enabled-in-error/index.js 1:0-25
@@ -1,6 +1,7 @@
module.exports = {
entry: "./index",
stats: {
hash: false,
moduleTrace: true
}
};

0 comments on commit 09c34cf

Please sign in to comment.