Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colorize test output and run tests for node 20 and "current" #515

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.