Skip to content

Commit 9285271

Browse files
authored
Merge pull request #515 from consideRatio/pr/test-node-20
Colorize test output and run tests for node 20 and "current"
2 parents e01e982 + 9d61276 commit 9285271

File tree

5 files changed

+24
-9
lines changed

5 files changed

+24
-9
lines changed

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- uses: actions/checkout@v4
3434
- uses: actions/setup-node@v4
3535
with:
36-
node-version: "16"
36+
node-version: "20"
3737
registry-url: https://registry.npmjs.org/
3838
- run: npm ci
3939
- run: npm publish

.github/workflows/test.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/checkout@v4
3030
- uses: actions/setup-node@v4
3131
with:
32-
node-version: "16"
32+
node-version: "20"
3333

3434
# Action Repo: https://github.com/actions/cache
3535
- name: "Cache node_modules"
@@ -64,7 +64,8 @@ jobs:
6464
- "14"
6565
- "16"
6666
- "18"
67-
- "19"
67+
- "20"
68+
- current
6869

6970
steps:
7071
- uses: actions/checkout@v4

package.json

+1-1
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

+19
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

-5
This file was deleted.

0 commit comments

Comments
 (0)