Skip to content

Commit

Permalink
test: remove dependency on "true" which is not on all windows sytems
Browse files Browse the repository at this point in the history
test: add --fix command for easier local development
build: turn off npm updates which were causing issues with snapshots
Co-authored-by: Austin Akers <[email protected]>
Co-authored-by: Austin Akers <[email protected]>
  • Loading branch information
3 people authored Apr 19, 2024
1 parent f6e5aba commit 8120112
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm i npm@latest -g
- run: npm config set update-notifier false
- run: npm ci --engine-strict
- run: npm test
windows:
Expand All @@ -30,6 +30,6 @@ jobs:
with:
node-version: lts/*
cache: npm
- run: npm i npm@latest -g
- run: npm config set update-notifier false
- run: npm ci
- run: npm test
1 change: 0 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://external-dot-oss-automation.appspot.com'
cache: npm
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
Expand Down
49 changes: 40 additions & 9 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"pretest": "npm run lint && npm run clean && npm run instrument",
"test": "tap",
"snap": "npm test -- --snapshot",
"fix": "standard --fix",
"posttest": "npm run report",
"clean": "node ./npm-run-clean.js",
"instrument": "node ./build-self-coverage.js",
Expand Down Expand Up @@ -68,7 +69,7 @@
"glob": "^7.1.6",
"istanbul-lib-coverage": "^3.0.0",
"istanbul-lib-hook": "^3.0.0",
"istanbul-lib-instrument": "^4.0.0",
"istanbul-lib-instrument": "^6.0.2",
"istanbul-lib-processinfo": "^2.0.2",
"istanbul-lib-report": "^3.0.0",
"istanbul-lib-source-maps": "^4.0.0",
Expand Down
1 change: 1 addition & 0 deletions tap-snapshots/test/nyc-integration.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ exports[`test/nyc-integration.js > TAP > passes configuration via environment va
`

exports[`test/nyc-integration.js > TAP > recursive run does not throw > stdout 1`] = `
hello
`

Expand Down
4 changes: 2 additions & 2 deletions test/helpers/run-nyc.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ async function runNYC ({ args, tempDir, leavePathSep, cwd = fixturesCLI, env = {
stderr,
stdout
},
stderr: sanitizeString(stderr, cwd, leavePathSep),
stdout: sanitizeString(stdout, cwd, leavePathSep)
stderr: sanitizeString(stderr.toString('utf8'), cwd, leavePathSep),
stdout: sanitizeString(stdout.toString('utf8'), cwd, leavePathSep)
}
}

Expand Down
1 change: 0 additions & 1 deletion test/helpers/test-success.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ async function testSuccess (t, opts) {

t.equal(status, 0)
t.equal(stderr, '')
console.info(stdout)
t.matchSnapshot(stdout, 'stdout')
}

Expand Down
3 changes: 2 additions & 1 deletion test/nyc-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ t.test('recursive run does not throw', t => testSuccess(t, {
nycBin,
process.execPath,
nycBin,
'true'
'echo',
'hello'
],
cwd: path.resolve(__dirname, 'fixtures/recursive-run')
}))
Expand Down

0 comments on commit 8120112

Please sign in to comment.