Skip to content

Commit 66799c0

Browse files
committed
fix(jest): update usage of jest.runCli
jest.runCli returns a promise. This change updates the usage of jest.runCli to use the promise rather than pass in a callback which never will get executed. closes #896
1 parent 00ed997 commit 66799c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/resources/tasks/jest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default (cb) => {
1313

1414
process.env.BABEL_TARGET = 'node';
1515

16-
jest.runCLI(options, [path.resolve(__dirname, '../../')], (result) => {
16+
jest.runCLI(options, [path.resolve(__dirname, '../../')]).then((result) => {
1717
if (result.numFailedTests || result.numFailedTestSuites) {
1818
cb(new gutil.PluginError('gulp-jest', { message: 'Tests Failed' }));
1919
} else {

lib/resources/tasks/jest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ export default (cb) => {
1212
Object.assign(options, { watch: true});
1313
}
1414

15-
jest.runCLI(options, [path.resolve(__dirname, '../../')], (result) => {
15+
jest.runCLI(options, [path.resolve(__dirname, '../../')]).then((result) => {
1616
if(result.numFailedTests || result.numFailedTestSuites) {
1717
cb(new gutil.PluginError('gulp-jest', { message: 'Tests Failed' }));
1818
} else {
1919
cb();
2020
}
2121
});
22-
};
22+
};

0 commit comments

Comments
 (0)