tape-six 1.7.8 → 1.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -109,8 +109,8 @@ tape-six/
|
|
|
109
109
|
├── bin/ # CLI utilities: tape6, tape6-server, tape6-node, tape6-bun, tape6-deno, tape6-seq
|
|
110
110
|
├── src/ # Source code (test engine, reporters, runners, utilities)
|
|
111
111
|
├── web-app/ # Browser test UI application
|
|
112
|
-
├── tests/ # Test files
|
|
113
|
-
├──
|
|
112
|
+
├── tests/ # Test files (JS + TS)
|
|
113
|
+
├── skills/ # Agent Skills (agentskills.io) shipped via npm
|
|
114
114
|
├── wiki/ # GitHub wiki documentation (submodule)
|
|
115
115
|
└── vendors/ # Git submodules (deep6)
|
|
116
116
|
```
|
|
@@ -132,9 +132,8 @@ The whole API is based on two objects: `test` and `Tester`.
|
|
|
132
132
|
import test from 'tape-six';
|
|
133
133
|
// import {test} from 'tape-six';
|
|
134
134
|
|
|
135
|
-
// CommonJS:
|
|
135
|
+
// CommonJS (named import is recommended):
|
|
136
136
|
// const {test} = require('tape-six');
|
|
137
|
-
// const {default: test} = require('tape-six');
|
|
138
137
|
```
|
|
139
138
|
|
|
140
139
|
To help port tests from other frameworks, `test()` is aliased as `suite()`, `describe()` and `it()`. When called inside a test body, `test()` and its aliases automatically delegate to the current tester's `t.test()` method. The same applies to `test.skip()`, `test.todo()`, and `test.asPromise()`. Using `t.test()` directly is still preferred because it makes the delegation explicit.
|
|
@@ -420,6 +419,8 @@ Test output can be controlled by flags. See [Supported flags](https://github.com
|
|
|
420
419
|
|
|
421
420
|
The most recent releases:
|
|
422
421
|
|
|
422
|
+
- 1.7.10 _Switched from workflows to Agent Skills (agentskills.io) for consumer integration. Improved CJS import docs._
|
|
423
|
+
- 1.7.9 _Merged test directories, fixed `.d.ts` typings, added `ts-check` to CI._
|
|
423
424
|
- 1.7.8 _Bug fix: Deno stdout flush before exit to prevent truncated output._
|
|
424
425
|
- 1.7.7 _Bug fix: Windows path normalization in `tape6-server`, documented `--flags=FO` option form._
|
|
425
426
|
- 1.7.6 _Bug fix: `processArgs` alias canonicalization, dead code removal, doc fix._
|
package/index.d.ts
CHANGED
|
@@ -1130,17 +1130,17 @@ export declare const test: Test;
|
|
|
1130
1130
|
/**
|
|
1131
1131
|
* An alias for `test`. When called inside a test body, it delegates to the current tester.
|
|
1132
1132
|
*/
|
|
1133
|
-
export declare const suite
|
|
1133
|
+
export declare const suite: Test;
|
|
1134
1134
|
|
|
1135
1135
|
/**
|
|
1136
1136
|
* An alias for `test`. When called inside a test body, it delegates to the current tester.
|
|
1137
1137
|
*/
|
|
1138
|
-
export declare const describe
|
|
1138
|
+
export declare const describe: Test;
|
|
1139
1139
|
|
|
1140
1140
|
/**
|
|
1141
1141
|
* An alias for `test`. When called inside a test body, it delegates to the current tester.
|
|
1142
1142
|
*/
|
|
1143
|
-
export declare const it
|
|
1143
|
+
export declare const it: Test;
|
|
1144
1144
|
|
|
1145
1145
|
/**
|
|
1146
1146
|
* Registers a function that will be called before all 1st-level embedded tests in the current scope.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tape-six",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.10",
|
|
4
4
|
"description": "TAP-based unit test library for Node, Deno, Bun, and browsers. ES modules, TypeScript, zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"test:seq:deno": "deno run -A ./bin/tape6-seq.js --flags FO",
|
|
36
36
|
"test:puppeteer": "node tests/puppeteer-chrome.js",
|
|
37
37
|
"test:playwright": "node tests/playwright-chrome.js",
|
|
38
|
-
"ts-
|
|
39
|
-
"ts-test": "
|
|
40
|
-
"ts-test:
|
|
41
|
-
"ts-
|
|
38
|
+
"ts-test": "node ./bin/tape6.js --flags FO 'tests/test-*.*ts'",
|
|
39
|
+
"ts-test:bun": "bun run ./bin/tape6-bun.js --flags FO 'tests/test-*.*ts'",
|
|
40
|
+
"ts-test:deno": "deno run -A ./bin/tape6-deno.js --flags FO 'tests/test-*.*ts'",
|
|
41
|
+
"ts-check": "tsc --noEmit"
|
|
42
42
|
},
|
|
43
43
|
"github": "http://github.com/uhop/tape-six",
|
|
44
44
|
"repository": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"llms.txt",
|
|
82
82
|
"llms-full.txt",
|
|
83
83
|
"TESTING.md",
|
|
84
|
-
"
|
|
84
|
+
"skills"
|
|
85
85
|
],
|
|
86
86
|
"tape6": {
|
|
87
87
|
"tests": [
|
|
@@ -104,10 +104,10 @@
|
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@types/chai": "^5.2.3",
|
|
107
|
-
"@types/node": "^25.3.
|
|
107
|
+
"@types/node": "^25.3.5",
|
|
108
108
|
"chai": "^6.2.2",
|
|
109
109
|
"playwright": "^1.58.2",
|
|
110
|
-
"puppeteer": "^24.
|
|
110
|
+
"puppeteer": "^24.38.0",
|
|
111
111
|
"typescript": "^5.9.3"
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
name: write-tests
|
|
3
|
+
description: Write or update tests using the tape-six testing library. Use when asked to write tests, add test coverage, or create test files for a project that uses tape-six.
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# Write Tests
|
|
@@ -17,7 +18,7 @@ Write or update tests using the tape-six testing library.
|
|
|
17
18
|
1. Read the testing guide at `node_modules/tape-six/TESTING.md` for API reference and patterns.
|
|
18
19
|
2. Identify the module or feature to test. Read its source code to understand the public API.
|
|
19
20
|
3. Create or update the test file in `tests/test-<name>.js` (or `.ts` for TypeScript projects):
|
|
20
|
-
- Import `test` from `tape-six` (ESM: `import test from 'tape-six'`; CJS: `const {test} = require('tape-six')`).
|
|
21
|
+
- Import `test` from `tape-six` (ESM: `import test from 'tape-six'`; CJS: `const {test} = require('tape-six')` — named import is recommended for CommonJS).
|
|
21
22
|
- Import the module under test using the project's package name.
|
|
22
23
|
- Write one top-level `test()` per logical group.
|
|
23
24
|
- Use embedded `await t.test()` for sub-cases.
|
|
@@ -25,9 +26,7 @@ Write or update tests using the tape-six testing library.
|
|
|
25
26
|
- Cover: normal operation, edge cases, error conditions.
|
|
26
27
|
- Use `t.equal` for primitives, `t.deepEqual` for objects/arrays, `t.throws` for errors, `await t.rejects` for async errors.
|
|
27
28
|
- All `msg` arguments are optional but recommended for clarity.
|
|
28
|
-
// turbo
|
|
29
29
|
4. Run the new test file directly to verify: `node tests/test-<name>.js`
|
|
30
|
-
// turbo
|
|
31
30
|
5. Run the full test suite to check for regressions: `npm test`
|
|
32
31
|
- If debugging, use `npm run test:seq` (runs sequentially, easier to trace issues).
|
|
33
32
|
6. Report results and any failures.
|