Skip to content

Commit 5f7b7d3

Browse files
committed
chore: move test to js file instead of mjs, set 80% threshold
1 parent 5c5d780 commit 5f7b7d3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

workspaces/www/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"snap": "node --test --test-update-snapshots ./test/**/*.js",
1616
"posttest": "npm run lint",
1717
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
18-
"test:cover": "node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100 ./test/**/*.js"
18+
"test:cover": "node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=80 --test-coverage-functions=80 --test-coverage-branches=80 ./test/**/*.js"
1919
},
2020
"repository": {
2121
"type": "git",
@@ -45,7 +45,8 @@
4545
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
4646
"version": "4.27.0",
4747
"content": "../../scripts/template-oss",
48-
"testRunner": "node:test"
48+
"testRunner": "node:test",
49+
"coverageThreshold": 80
4950
},
5051
"dependencies": {
5152
"bootstrap": "^5.2.3",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { default as t } from 'node:test'
2-
import { default as a } from 'node:assert'
3-
import { spawnSync } from 'child_process'
1+
const t = require('node:test')
2+
const a = require('node:assert')
3+
const { spawnSync } = require('child_process')
44

55
t.test('can build', async () => {
66
const res = spawnSync('npm', ['run', 'build', '--', '--prod'])

0 commit comments

Comments
 (0)