@git.zone/tstest 3.5.1 → 3.6.0

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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@git.zone/tstest',
6
- version: '3.5.1',
6
+ version: '3.6.0',
7
7
  description: 'A powerful, modern test runner for TypeScript with multi-runtime support (Node.js, Deno, Bun, Chromium) and a batteries-included test framework.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxrQkFBa0I7SUFDeEIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLGtKQUFrSjtDQUNoSyxDQUFBIn0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@git.zone/tstest",
3
- "version": "3.5.1",
3
+ "version": "3.6.0",
4
4
  "private": false,
5
5
  "description": "A powerful, modern test runner for TypeScript with multi-runtime support (Node.js, Deno, Bun, Chromium) and a batteries-included test framework.",
6
6
  "exports": {
@@ -25,11 +25,11 @@
25
25
  "buildDocs": "tsdoc"
26
26
  },
27
27
  "devDependencies": {
28
- "@git.zone/tsbuild": "^4.3.0",
28
+ "@git.zone/tsbuild": "^4.4.0",
29
29
  "@types/node": "^25.5.0"
30
30
  },
31
31
  "dependencies": {
32
- "@git.zone/tsbundle": "^2.9.1",
32
+ "@git.zone/tsbundle": "^2.10.0",
33
33
  "@git.zone/tsrun": "^2.0.1",
34
34
  "@push.rocks/consolecolor": "^2.0.3",
35
35
  "@push.rocks/qenv": "^6.1.3",
@@ -47,14 +47,14 @@
47
47
  "@push.rocks/smartpath": "^6.0.0",
48
48
  "@push.rocks/smartpromise": "^4.2.3",
49
49
  "@push.rocks/smartrequest": "^5.0.1",
50
- "@push.rocks/smartserve": "^2.0.1",
50
+ "@push.rocks/smartserve": "^2.0.3",
51
51
  "@push.rocks/smartshell": "^3.3.8",
52
- "@push.rocks/smartstorage": "^6.0.1",
52
+ "@push.rocks/smartstorage": "^6.3.2",
53
53
  "@push.rocks/smarttime": "^4.2.3",
54
- "@push.rocks/smartwatch": "^6.3.0",
54
+ "@push.rocks/smartwatch": "^6.4.0",
55
55
  "@types/ws": "^8.18.1",
56
56
  "figures": "^6.1.0",
57
- "ws": "^8.19.0"
57
+ "ws": "^8.20.0"
58
58
  },
59
59
  "files": [
60
60
  "ts/**/*",
@@ -65,7 +65,7 @@
65
65
  "dist_ts_web/**/*",
66
66
  "assets/**/*",
67
67
  "cli.js",
68
- "npmextra.json",
68
+ ".smartconfig.json",
69
69
  "readme.md"
70
70
  ],
71
71
  "browserslist": [
package/readme.md CHANGED
@@ -624,7 +624,7 @@ const messages = parser.parseLine('ok 1 - test ⟦TSTEST:time:42⟧');
624
624
 
625
625
  ## License and Legal Information
626
626
 
627
- This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file.
627
+ This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](./license.md) file.
628
628
 
629
629
  **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
630
630
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@git.zone/tstest',
6
- version: '3.5.1',
6
+ version: '3.6.0',
7
7
  description: 'A powerful, modern test runner for TypeScript with multi-runtime support (Node.js, Deno, Bun, Chromium) and a batteries-included test framework.'
8
8
  }
package/ts/readme.md ADDED
@@ -0,0 +1,147 @@
1
+ # @git.zone/tstest
2
+
3
+ > 🚀 Multi-runtime TypeScript test runner with beautiful output and intelligent test orchestration
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # tstest is the main CLI entry point
9
+ pnpm install --save-dev @git.zone/tstest
10
+ ```
11
+
12
+ ## Issue Reporting and Security
13
+
14
+ For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
15
+
16
+ ## Overview
17
+
18
+ This is the core test runner module of `@git.zone/tstest`. It provides the CLI, test discovery, multi-runtime execution, TAP output parsing, structured logging, and test orchestration. It ties together the entire testing pipeline — from finding test files to dispatching them across Node.js, Chromium, Deno, Bun, and Docker runtimes.
19
+
20
+ ## Key Features
21
+
22
+ - 🔍 **Smart Test Discovery** — Glob patterns, directory scanning, and single-file mode
23
+ - 🏃 **Multi-Runtime Execution** — Node.js, Chromium, Deno, Bun, and Docker adapters
24
+ - 📊 **TAP Protocol Parsing** — Full Protocol V2 support with structured metadata
25
+ - 🎨 **Rich Logging** — Color-coded output, JSON mode, per-file log files, diff tracking
26
+ - ⚡ **Parallel Execution** — File-level parallel groups via `*.para__N.*` naming
27
+ - 👀 **Watch Mode** — Re-run tests on file changes with debouncing
28
+ - 🏷️ **Tag Filtering** — Run only tests matching specific tags
29
+ - ⏱️ **Timeout Management** — Per-file timeouts with process tree termination
30
+ - 📝 **Test File Directives** — Inline comments to configure runtime permissions and flags
31
+ - 🔄 **Before Scripts** — `package.json`-based lifecycle hooks (`test:before`, `test:before:testfile`)
32
+ - 🐳 **Docker Testing** — Run tests inside Docker containers via `*.docker.sh` files
33
+ - 🔀 **Legacy Migration** — Automatic rename of `.browser.ts` → `.chromium.ts` patterns
34
+
35
+ ## Architecture
36
+
37
+ ### Runtime Adapter System
38
+
39
+ Each runtime is implemented as a `RuntimeAdapter` with a unified interface:
40
+
41
+ | Adapter | Runtime | How It Executes Tests |
42
+ |---|---|---|
43
+ | `NodeRuntimeAdapter` | Node.js | Spawns via `@git.zone/tsrun`, streams TAP output |
44
+ | `ChromiumRuntimeAdapter` | Chromium | Bundles with esbuild, serves over HTTP, communicates via WebSocket |
45
+ | `DenoRuntimeAdapter` | Deno | Runs `deno run` with configurable permissions |
46
+ | `BunRuntimeAdapter` | Bun | Runs `bun run` with auto-discovered config |
47
+ | `DockerRuntimeAdapter` | Docker | Builds image from Dockerfile, runs `docker run` |
48
+
49
+ ### Test File Naming Convention
50
+
51
+ Test filenames determine which runtime(s) execute them:
52
+
53
+ | Pattern | Runtimes |
54
+ |---|---|
55
+ | `*.ts` | Node.js (default) |
56
+ | `*.node.ts` | Node.js only |
57
+ | `*.chromium.ts` | Chromium browser |
58
+ | `*.deno.ts` | Deno |
59
+ | `*.bun.ts` | Bun |
60
+ | `*.all.ts` | All runtimes |
61
+ | `*.node+chromium.ts` | Node.js + Chromium |
62
+ | `*.para__N.ts` | Parallel group N |
63
+ | `*.docker.sh` | Docker container |
64
+
65
+ ### Execution Flow
66
+
67
+ 1. **Discovery** — `TestDirectory` scans for test files based on mode (directory/file/glob)
68
+ 2. **Grouping** — Files are split into serial and parallel groups (via `*.para__N.*` naming)
69
+ 3. **Before Scripts** — `test:before` / `test:before:testfile` from `package.json` run
70
+ 4. **Dispatch** — Each file is parsed for runtime specifiers and directives, then routed to the appropriate `RuntimeAdapter`
71
+ 5. **Parsing** — `TapParser` processes TAP output using Protocol V2, tracking results and events
72
+ 6. **Aggregation** — `TapCombinator` merges results from all test files
73
+ 7. **Reporting** — `TsTestLogger` outputs structured results (console, JSON, or log files)
74
+
75
+ ### Inline Directives
76
+
77
+ Test files can include comment directives at the top (before imports) to configure runtime behavior:
78
+
79
+ ```typescript
80
+ // tstest:deno:allowAll
81
+ // tstest:node:flag:--max-old-space-size=4096
82
+ // tstest:env:MY_VAR=value
83
+ import { tap, expect } from '@git.zone/tstest/tapbundle';
84
+ ```
85
+
86
+ Directives in `00init.ts` files apply to all tests in that directory and are merged with per-file directives.
87
+
88
+ ## CLI Usage
89
+
90
+ ```bash
91
+ # Directory mode — scan recursively for test files
92
+ tstest test/
93
+
94
+ # File mode — run a single test
95
+ tstest test/test.math.ts
96
+
97
+ # Glob mode — match patterns
98
+ tstest "test/**/*.node.ts"
99
+ ```
100
+
101
+ ### Options
102
+
103
+ | Flag | Description |
104
+ |---|---|
105
+ | `--verbose`, `-v` | Show all console output from tests |
106
+ | `--quiet`, `-q` | Minimal output for CI |
107
+ | `--json` | Machine-readable JSON output |
108
+ | `--logfile` | Write per-file logs to `.nogit/testlogs/` |
109
+ | `--tags <tags>` | Filter tests by comma-separated tags |
110
+ | `--timeout <sec>` | Per-file timeout in seconds |
111
+ | `--startFrom <n>` | Start from file number N |
112
+ | `--stopAt <n>` | Stop at file number N |
113
+ | `--watch`, `-w` | Re-run tests on file changes |
114
+ | `--watch-ignore <pat>` | Comma-separated ignore patterns |
115
+ | `--no-color` | Disable ANSI colors |
116
+
117
+ ## Public API
118
+
119
+ ```typescript
120
+ import { runCli, TestExecutionMode } from '@git.zone/tstest';
121
+ ```
122
+
123
+ | Export | Type | Description |
124
+ |---|---|---|
125
+ | `runCli()` | `async function` | CLI entry point — parses `process.argv` and runs tests |
126
+ | `TestExecutionMode` | `enum` | `DIRECTORY`, `FILE`, or `GLOB` |
127
+
128
+ ## License and Legal Information
129
+
130
+ This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](../license.md) file.
131
+
132
+ **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
133
+
134
+ ### Trademarks
135
+
136
+ This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
137
+
138
+ Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
139
+
140
+ ### Company Information
141
+
142
+ Task Venture Capital GmbH
143
+ Registered at District Court Bremen HRB 35230 HB, Germany
144
+
145
+ For any legal inquiries or further information, please contact us via email at hello@task.vc.
146
+
147
+ By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
File without changes