Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Commit e831164

Browse files
committed
more diagnostic when a scenario fails
1 parent 2c76b82 commit e831164

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tasks/webpack-scenario.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ module.exports = function(grunt){
8181
var actual = mockFs.files[p];
8282
actual = _.str.strRight(actual, IGNORE_BEFORE);
8383
var expected = grunt.file.read(abspath);
84-
grunt.file.write('bundle.js', actual);
84+
//grunt.file.write('bundle.js', actual);
8585
var actualZ = normalise(actual);
8686
var expectedZ = normalise(expected);
8787
if( expectedZ !== actualZ){
@@ -91,7 +91,7 @@ module.exports = function(grunt){
9191
process.stdout.write(expected);
9292
grunt.log.debug("Actual:");
9393
process.stdout.write(actual);
94-
//grunt.file.write('bundle.js', actual);
94+
//grunt.file.write('bundle.js', actual);
9595
}
9696
}
9797
}else{
@@ -102,7 +102,8 @@ module.exports = function(grunt){
102102
grunt.log.debug("compiled "+confFile+" OK.");
103103
cb();
104104
}else{
105-
cb(new Error("scenario failed"));
105+
errors.unshift("Scenario failed: ");
106+
cb(new Error(errors.join('\n')));
106107
}
107108
}
108109
});

0 commit comments

Comments
 (0)