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

Test Harness Refactor #514

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 16 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
process.env.TS_NODE_SKIP_PROJECT = true

const config = {
"diff": true,
"extension": ["*"],
"package": "./package.json",
"reporter": "spec",
"slow": 1000,
"timeout": 10000,
"ui": "bdd",
"watch-files": ["./test/*.spec.js"],
"node-option": ["max-old-space-size=5120"],
"jobs": 30
}

module.exports = config
158 changes: 104 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"url": "git@github.com:bcoe/c8.git"
},
"scripts": {
"test": "cross-env TS_NODE_SKIP_PROJECT=true node ./bin/c8.js mocha --timeout=10000 ./test/*.js",
"coverage": "cross-env TS_NODE_SKIP_PROJECT=true node ./bin/c8.js --check-coverage mocha --timeout=10000 ./test/*.js",
"test": "c8 mocha ./test/*.spec.js",
"coverage": "c8 --check-coverage mocha ./test/*.spec.js",
"test:snap": "cross-env CHAI_JEST_SNAPSHOT_UPDATE_ALL=true npm test",
"fix": "standard --fix",
"posttest": "standard"
Expand Down Expand Up @@ -47,6 +47,7 @@
},
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^9.1.0",
"chai": "^4.3.6",
"chai-jest-snapshot": "^2.0.0",
"cross-env": "^7.0.3",
Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions test/integration.js.snap → test/integration.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ hey
---------------------------------------|---------|----------|---------|---------|------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------------------|---------|----------|---------|---------|------------------------
All files | 3.52 | 12.5 | 6.52 | 3.52 |
All files | 3.49 | 12.24 | 6.38 | 3.49 |
c8 | 0 | 0 | 0 | 0 |
.mocharc.js | 0 | 0 | 0 | 0 | 1-16
index.js | 0 | 0 | 0 | 0 | 1
c8/bin | 0 | 0 | 0 | 0 |
c8.js | 0 | 0 | 0 | 0 | 1-43
Expand Down Expand Up @@ -521,8 +522,9 @@ hey
---------------------------------------|---------|----------|---------|---------|------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------------------|---------|----------|---------|---------|------------------------
All files | 3.52 | 12.5 | 6.52 | 3.52 |
All files | 3.49 | 12.24 | 6.38 | 3.49 |
c8 | 0 | 0 | 0 | 0 |
.mocharc.js | 0 | 0 | 0 | 0 | 1-16
index.js | 0 | 0 | 0 | 0 | 1
c8/bin | 0 | 0 | 0 | 0 |
c8.js | 0 | 0 | 0 | 0 | 1-43
Expand Down
1 change: 1 addition & 0 deletions test/parse-args.js → test/parse-args.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const {
} = require('../lib/parse-args')

const { join, resolve } = require('path')
require('chai').should()

describe('parse-args', () => {
describe('hideInstrumenteeArgs', () => {
Expand Down
File renamed without changes.