From 53fd514bb0abb3bd6e10d3def1812fbb244b56f3 Mon Sep 17 00:00:00 2001 From: ankittre2000 Date: Fri, 10 Feb 2023 13:17:47 -0500 Subject: [PATCH] Update jasmine (minor code change) --- gulpfile.js | 11 ++++++----- package.json | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index d8528f8..c1fd135 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -37,19 +37,20 @@ module.exports = { "generate-third-party": generateThirdParty, }; -function test(done) { +async function test(done) { const jasmine = new Jasmine(); jasmine.loadConfigFile("specs/jasmine.json"); + jasmine.exitOnCompletion = false; jasmine.addReporter( new JasmineSpecReporter({ displaySuccessfulSpec: !defined(argv.suppressPassed) || !argv.suppressPassed, }) ); - jasmine.execute(); - jasmine.onComplete(function (passed) { - done(argv.failTaskOnError && !passed ? 1 : 0); - }); + const results = await jasmine.execute(); + if (argv.failTaskOnError && results.overallStatus === "failed") { + process.exitCode = 1; + } } function testWatch() { diff --git a/package.json b/package.json index d74bd73..e660c3e 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "eslint-plugin-node": "^11.1.0", "gulp": "^4.0.2", "husky": "^4.3.8", - "jasmine": "^3.10.0", + "jasmine": "^4.5.0", "jasmine-spec-reporter": "^7.0.0", "jsdoc": "^3.6.7", "nyc": "^15.1.0",