Skip to content

Commit

Permalink
Merge pull request #515 from consideRatio/pr/test-node-20
Browse files Browse the repository at this point in the history
Colorize test output and run tests for node 20 and "current"
  • Loading branch information
minrk authored Nov 27, 2023
2 parents e01e982 + 9d61276 commit 9285271
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "20"
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "20"

# Action Repo: https://github.com/actions/cache
- name: "Cache node_modules"
Expand Down Expand Up @@ -64,7 +64,8 @@ jobs:
- "14"
- "16"
- "18"
- "19"
- "20"
- current

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"scripts": {
"lint": "jshint bin/ lib/ test/",
"fmt": "pre-commit run --all-files",
"test": "nyc jasmine JASMINE_CONFIG_PATH=test/jasmine.json",
"test": "FORCE_COLOR=3 nyc node test/jasmine.js",
"coverage-html": "nyc report --reporter=html",
"codecov": "nyc report --reporter=lcov && codecov"
}
Expand Down
19 changes: 19 additions & 0 deletions test/jasmine.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var Jasmine = require("jasmine");
var jasmine = new Jasmine();

jasmine.loadConfig({
// Config reference: https://jasmine.github.io/api/npm/edge/Configuration.html
random: false,
spec_dir: "test",
spec_files: ["*_spec.js"],
});
jasmine.configureDefaultReporter({
// Options reference: https://jasmine.github.io/api/npm/edge/ConsoleReporterOptions.html
//
// showColors influences the green dots for each successful test, but not the
// report after tests complete from istanbul-reports depending on
// supports-color package that respects the FORCE_COLOR environment variable.
//
showColors: true,
});
jasmine.execute();
5 changes: 0 additions & 5 deletions test/jasmine.json

This file was deleted.

0 comments on commit 9285271

Please sign in to comment.