fix(docs): refresh documentation and test timing tolerances for updated APIs

This commit is contained in:
2026-05-09 12:36:02 +00:00
parent 6d6a08b168
commit 6c8485c779
11 changed files with 2093 additions and 3106 deletions
+14 -10
View File
@@ -2,15 +2,15 @@
🧪 **A powerful, modern test runner for TypeScript** — beautiful output, multi-runtime support, and a batteries-included test framework that makes testing actually enjoyable.
## Issue Reporting and Security
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.
## Availability and Links
- [npmjs.org (npm package)](https://www.npmjs.com/package/@git.zone/tstest)
- [code.foss.global (source)](https://code.foss.global/git.zone/tstest)
## Issue Reporting and Security
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.
## Why tstest?
Most TypeScript test runners feel like an afterthought — clunky configuration, ugly output, and poor TypeScript support. **tstest** was built from the ground up for TypeScript developers who want:
@@ -126,7 +126,7 @@ Name your test files with runtime specifiers to control where they run:
### Runtime Execution Order
When multiple runtimes are specified, tests execute in this order: **Node.js → Bun → Deno → Chromium**
When multiple runtimes are specified, tests execute in this order: **Node.js → Chromium → Deno → Bun**
### Migration from Legacy Naming
@@ -147,6 +147,7 @@ tstest migrate --write
| Option | Description |
|---|---|
| `--version` | Show the installed tstest version |
| `--quiet`, `-q` | Minimal output — perfect for CI |
| `--verbose`, `-v` | Show all console output from tests |
| `--no-color` | Disable colored output |
@@ -158,7 +159,6 @@ tstest migrate --write
| `--stopAt <n>` | Stop at test file number N |
| `--watch`, `-w` | Re-run tests on file changes |
| `--watch-ignore <patterns>` | Ignore patterns in watch mode |
| `--only` | Run only tests marked with `.only` |
## Writing Tests with tapbundle
@@ -287,7 +287,9 @@ tap.test('snapshot test', async (tools) => {
### Test Fixtures
```typescript
tap.defineFixture('testUser', async (data) => ({
import { tap, expect, TapTools } from '@git.zone/tstest/tapbundle';
TapTools.defineFixture('testUser', async (data) => ({
id: Date.now(),
name: data?.name || 'Test User',
email: data?.email || 'test@example.com',
@@ -368,8 +370,10 @@ expect(7).customAssertion(v => v % 2 === 1, 'Value is not odd');
For Node.js-only tests, import server-side utilities:
```typescript
import { tapNodeTools } from '@git.zone/tstest/tapbundle_serverside';
import { tap, expect } from '@git.zone/tstest/tapbundle';
import { TapNodeTools } from '@git.zone/tstest/tapbundle_serverside';
const tapNodeTools = new TapNodeTools(tap);
```
### 🌐 Network Utilities
@@ -437,7 +441,7 @@ await mongo.stop();
### 📦 Local S3 Storage
```typescript
const s3 = await tapNodeTools.createSmarts3();
const s3 = await tapNodeTools.createSmartStorage();
// ... run object storage tests ...
await s3.stop();
```
@@ -448,7 +452,7 @@ Control runtime behavior directly from your test files using special comment dir
### Deno Permissions
By default, Deno tests run with `--allow-read`, `--allow-env`, `--allow-net`, `--allow-write`, `--allow-sys`, and `--allow-import`. Add directives to request additional permissions:
By default, Deno tests run with `--allow-read`, `--allow-env`, `--allow-net`, `--allow-write`, `--allow-sys`, `--allow-import`, `--node-modules-dir`, and `--sloppy-imports`. Add directives to request additional permissions:
```typescript
// tstest:deno:allowAll