Skip to content
Open
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
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ jobs:
node: ${{ steps.node.outputs.node-version }}
- name: Install Dependencies
run: npm i --ignore-scripts --no-audit --no-fund
- name: Add Problem Matcher
run: echo "::add-matcher::.github/matchers/tap.json"
- name: Test
- name: Test (with coverage on Node >= 24)
if: ${{ startsWith(matrix.node-version, '24') }}
run: npm run test:cover --ignore-scripts
- name: Test (without coverage on Node < 24)
if: ${{ !startsWith(matrix.node-version, '24') }}
run: npm test --ignore-scripts
19 changes: 7 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run eslint -- --fix",
"snap": "tap",
"test": "tap",
"snap": "node --test --test-update-snapshots './test/**/*.js'",
"test": "node --test './test/**/*.js'",
"posttest": "npm run lint",
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
"test:cover": "node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100 './test/**/*.js'"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -48,17 +49,11 @@
".github/ISSUE_TEMPLATE/bug.yml": false,
".commitlintrc.js": false
}
}
},
"tap": {
"nyc-arg": [
"--exclude",
"tap-snapshots/**"
]
},
"testRunner": "node:test"
},
"devDependencies": {
"@npmcli/eslint-config": "^6.0.0",
"@npmcli/template-oss": "4.27.1",
"tap": "^16.3.2"
"@npmcli/template-oss": "4.27.1"
}
}
7 changes: 4 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const t = require('tap')
const t = require('node:test')
const a = require('node:assert')

t.test('no tests yet', async t => {
t.test('no tests yet', async () => {
// TODO: test for formatting, etc in RFCs?
t.ok(1)
a.ok(1)
})
Loading