Skip to content

Commit 9d61276

Browse files
committed
tests: run tests via .js file to configure color
1 parent c3db07f commit 9d61276

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"scripts": {
4141
"lint": "jshint bin/ lib/ test/",
4242
"fmt": "pre-commit run --all-files",
43-
"test": "nyc jasmine JASMINE_CONFIG_PATH=test/jasmine.json",
43+
"test": "FORCE_COLOR=3 nyc node test/jasmine.js",
4444
"coverage-html": "nyc report --reporter=html",
4545
"codecov": "nyc report --reporter=lcov && codecov"
4646
}

test/jasmine.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var Jasmine = require("jasmine");
2+
var jasmine = new Jasmine();
3+
4+
jasmine.loadConfig({
5+
// Config reference: https://jasmine.github.io/api/npm/edge/Configuration.html
6+
random: false,
7+
spec_dir: "test",
8+
spec_files: ["*_spec.js"],
9+
});
10+
jasmine.configureDefaultReporter({
11+
// Options reference: https://jasmine.github.io/api/npm/edge/ConsoleReporterOptions.html
12+
//
13+
// showColors influences the green dots for each successful test, but not the
14+
// report after tests complete from istanbul-reports depending on
15+
// supports-color package that respects the FORCE_COLOR environment variable.
16+
//
17+
showColors: true,
18+
});
19+
jasmine.execute();

test/jasmine.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)