Comparing version 2.0.1 to 2.0.2
@@ -63,2 +63,3 @@ "use strict"; | ||
_onStart() { | ||
console.log(''); | ||
this._store.open(); | ||
@@ -173,2 +174,9 @@ } | ||
const report = this._store.getReport(); | ||
/** | ||
* Show zero executed tests when no tests were ran | ||
*/ | ||
if (report.total === 0) { | ||
console.log(chalk_1.default.bgMagenta.white(' ZERO TESTS EXECUTED ')); | ||
return; | ||
} | ||
const failedGroups = report.groups.filter((group) => { | ||
@@ -175,0 +183,0 @@ return group.failedTests.length || group.failedHooks.length; |
@@ -29,3 +29,3 @@ /** | ||
*/ | ||
export declare function run(): Promise<void>; | ||
export declare function run(exitProcess?: boolean): Promise<void>; | ||
export declare namespace test { | ||
@@ -32,0 +32,0 @@ /** |
@@ -22,2 +22,3 @@ "use strict"; | ||
*/ | ||
const chalk_1 = require("chalk"); | ||
const Runner_1 = require("../Runner"); | ||
@@ -86,3 +87,3 @@ const Group_1 = require("../Group"); | ||
*/ | ||
function run() { | ||
function run(exitProcess = true) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -93,3 +94,4 @@ const runner = new Runner_1.Runner(groups, runnerOptions); | ||
if (loaderFiles.length && groups.length) { | ||
throw new Error('Calling test.configure inside test file is not allowed. Create a master file for same'); | ||
console.log(chalk_1.default.bgRed('Calling configure inside test file is not allowed. Create a master file for same')); | ||
process.exit(1); | ||
} | ||
@@ -100,3 +102,13 @@ /** | ||
loaderFiles.forEach((file) => require(file)); | ||
yield runner.run(); | ||
try { | ||
yield runner.run(); | ||
if (exitProcess) { | ||
process.exit(0); | ||
} | ||
} | ||
catch (error) { | ||
if (exitProcess) { | ||
process.exit(1); | ||
} | ||
} | ||
groups = []; | ||
@@ -103,0 +115,0 @@ activeGroup = null; |
@@ -0,1 +1,17 @@ | ||
<a name="2.0.2"></a> | ||
## [2.0.2](https://github.com/thetutlage/japa/compare/v2.0.1...v2.0.2) (2018-09-25) | ||
### Bug Fixes | ||
* **package:** use chai as the main dependency ([e020428](https://github.com/thetutlage/japa/commit/e020428)) | ||
* **slimRunner:** exit process with correct signals ([4d187f1](https://github.com/thetutlage/japa/commit/4d187f1)) | ||
### Features | ||
* **api:** export api module for custom test runners ([d626168](https://github.com/thetutlage/japa/commit/d626168)) | ||
<a name="2.0.1"></a> | ||
@@ -2,0 +18,0 @@ ## [2.0.1](https://github.com/thetutlage/japa/compare/v2.0.0...v2.0.1) (2018-09-22) |
{ | ||
"name": "japa", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Lean test runner for Node.js", | ||
@@ -9,3 +9,5 @@ "main": "build/index.js", | ||
"build/index.js", | ||
"build/index.d.js" | ||
"build/index.d.js", | ||
"build/api.js", | ||
"build/api.d.js" | ||
], | ||
@@ -37,2 +39,3 @@ "scripts": { | ||
"dependencies": { | ||
"chai": "^4.1.2", | ||
"chalk": "^2.4.1", | ||
@@ -54,3 +57,2 @@ "debug": "^4.0.1", | ||
"@types/node": "^10.10.3", | ||
"chai": "^4.1.2", | ||
"commitizen": "^2.10.1", | ||
@@ -80,3 +82,3 @@ "coveralls": "^3.0.2", | ||
"test", | ||
"japaFile.js" | ||
"src/Reporter" | ||
], | ||
@@ -83,0 +85,0 @@ "extension": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
131983
19
32
3385
0
11
+ Addedchai@^4.1.2
+ Addedassertion-error@1.1.0(transitive)
+ Addedchai@4.5.0(transitive)
+ Addedcheck-error@1.0.3(transitive)
+ Addeddeep-eql@4.1.4(transitive)
+ Addedget-func-name@2.0.2(transitive)
+ Addedloupe@2.3.7(transitive)
+ Addedpathval@1.1.1(transitive)
+ Addedtype-detect@4.1.0(transitive)