Skip to content

Commit f1746a8

Browse files
Copilotmetcoder95
andauthored
test: Replace tap tests with node:test (#9)
* Initial plan * Replace tap tests with node:test - Update test/simple-test.ts to use node:test and node:assert - Replace tap with tsx for TypeScript test execution - Remove tap, ts-node, snazzy, and standardx dependencies - Add tsx as dev dependency for test execution - Remove .taprc configuration file - Update test-only script to use node --import tsx --test Co-authored-by: metcoder95 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: metcoder95 <[email protected]>
1 parent a22e6f9 commit f1746a8

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

.taprc

Lines changed: 0 additions & 13 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build": "tsc && gen-esm-wrapper . dist/esm-wrapper.mjs",
1313
"lint": "eslint",
1414
"test": "npm run lint && npm run build && npm run test-only",
15-
"test-only": "tap --ts",
15+
"test-only": "node --import tsx --test test/*.ts",
1616
"prepack": "npm run build"
1717
},
1818
"repository": {
@@ -34,10 +34,7 @@
3434
"gen-esm-wrapper": "^1.1.1",
3535
"neostandard": "^0.12.2",
3636
"piscina": "^5.1.4",
37-
"snazzy": "^9.0.0",
38-
"standardx": "^7.0.0",
39-
"tap": "^15.0.6",
40-
"ts-node": "^10.9.2",
37+
"tsx": "^4.19.4",
4138
"typescript": "^5.9.3"
4239
},
4340
"peerDependencies": {

test/simple-test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import Piscina from 'piscina';
22
import PiscinaPriorityQueue from '..';
3-
import { test } from 'tap';
3+
import { test } from 'node:test';
4+
import assert from 'node:assert';
45
import { resolve } from 'path';
56

6-
test('PiscinaPriorityQueue works', async ({ equal }) => {
7+
test('PiscinaPriorityQueue works', async () => {
78
const queue = new PiscinaPriorityQueue();
8-
equal(queue.size, 0);
9+
assert.strictEqual(queue.size, 0);
910
const task = PiscinaPriorityQueue.makeTask({}, 1);
1011
queue.push(task);
11-
equal(queue.size, 1);
12+
assert.strictEqual(queue.size, 1);
1213
queue.remove(null);
1314
queue.remove({} as any);
14-
equal(queue.size, 1);
15+
assert.strictEqual(queue.size, 1);
1516
queue.remove(task);
16-
equal(queue.size, 0);
17+
assert.strictEqual(queue.size, 0);
1718
});
1819

1920
test('PiscinaPriorityQueue works with Piscina', async () => {

0 commit comments

Comments
 (0)