@ultimat3/testing 27.15.0 → 27.16.1
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/CLAUDE.md +10 -8
- package/package.json +16 -16
package/CLAUDE.md
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Tier 5. May import tiers 0–4. Imported by every package's tests and by generated apps.
|
|
4
4
|
|
|
5
|
-
Deps: `core`
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
`
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
Deps (15): `core`; `cache` `db` `i18n` `time`; `entity` `http` `policy`; `action` `jobs`
|
|
6
|
+
`query` `realtime`; `mail` `pwa` `render`. Static in `.`: `cache`
|
|
7
|
+
(`registry-leak-guard.ts:7`), `i18n`, `jobs`, `policy` (`registry-snapshot.ts:29-38`), `db`
|
|
8
|
+
(`reusable-database.ts:20`), `realtime/server` (`fixture-subscribe.ts:13`). Dynamic-only:
|
|
9
|
+
`action`, `http`, `mail`, `pwa`, `query`, `render`, `time` — no `mail` destructure, no mail
|
|
10
|
+
package; a `packages/core` import never loads `@ultimat3/entity`. `entity` exists for exactly
|
|
11
|
+
one call, `nPlusOne()`: the strict fixture reports `x dev`'s error, with the `fix:` the schema's
|
|
12
|
+
own relations spell — a second N+1 code here would be a second answer to one condition. Its one
|
|
13
|
+
static import: `registry-isolation.ts`, own entry point, off the barrel.
|
|
12
14
|
|
|
13
15
|
| Rule | Detail |
|
|
14
16
|
|---|---|
|
|
@@ -37,7 +39,7 @@ is its own entry point and not part of the barrel.
|
|
|
37
39
|
| One body shape, five registrars | `test` (= `fixtureTest`), `unitTest`, `contractTest`, `liveTest`, `jobTest` all take `FixtureBody` + `{ timeoutMs }`: `unitTest('…', async ({ runJobs }) => …)`. Never `describe(testName('unit', …))` + `test` to get a fixture |
|
|
38
40
|
| `runJobs` says who and what | `{ actor }` is the WORKER's identity (the org stays the job's declared tenant), `{ tenantId }` the enqueuer's row; `executions[n].result` is the body's return. A fresh event bus per fixture |
|
|
39
41
|
| A `runJobs` pass is a real worker's `tick()` | `fixture-jobs.ts` builds an unstarted `jobWorker` per pass, so admission runs: `concurrency` waits and `whenBusy: 'fail'` refuses (`X_JOB_KEY_BUSY`) exactly as in a fleet. Never `executeJob` on a bare `claim()`. The lease and slot renew every 1 ms of TEST time (`RENEW_MS`, `frozen-scheduler.ts` on `onClockMoved`), never on a wall-clock interval: cancel, `clock.advance(1)`, and the body hears `X_JOB_LEASE_LOST` — no hand-built worker |
|
|
40
|
-
| Per-test state is `per-test-reset.ts` | the app preload's `beforeEach` resets the jobs event bus — only when `@ultimat3/jobs` is already loaded, so
|
|
42
|
+
| Per-test state is `per-test-reset.ts` | the app preload's `beforeEach` resets the jobs event bus — only when `@ultimat3/jobs` is already loaded, so the reset never loads it |
|
|
41
43
|
| An island test is `describeIslandState` | one block per declared state: mounted in `beforeAll` (60 s), disposed in `afterAll`, one build per file. `mountIslandState` + `using` for one test's own mount; an undeclared id is `X_TEST_ISLAND_STATE_UNKNOWN` |
|
|
42
44
|
| An authenticator is tested with `authRequest()` | the hook's own two arguments, real — never `as unknown as Parameters<…>` |
|
|
43
45
|
| `LOG_LEVEL` above `info` filters the TERMINAL | `quiet-logs.ts` pins the logger at `info` while core loads, so a collecting `setLogSink` still sees `warn` under `LOG_LEVEL=error`. It stays the preload's FIRST import |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/testing",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.16.1",
|
|
4
4
|
"description": "Test harness: cloned template DBs per worker, frozen clock, sealed network, 6 test types",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"test": "bun test"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@ultimat3/action": "27.
|
|
40
|
-
"@ultimat3/cache": "27.
|
|
41
|
-
"@ultimat3/core": "27.
|
|
42
|
-
"@ultimat3/db": "27.
|
|
43
|
-
"@ultimat3/entity": "27.
|
|
44
|
-
"@ultimat3/http": "27.
|
|
45
|
-
"@ultimat3/i18n": "27.
|
|
46
|
-
"@ultimat3/jobs": "27.
|
|
47
|
-
"@ultimat3/mail": "27.
|
|
48
|
-
"@ultimat3/policy": "27.
|
|
49
|
-
"@ultimat3/pwa": "27.
|
|
50
|
-
"@ultimat3/query": "27.
|
|
51
|
-
"@ultimat3/realtime": "27.
|
|
52
|
-
"@ultimat3/render": "27.
|
|
53
|
-
"@ultimat3/time": "27.
|
|
39
|
+
"@ultimat3/action": "27.16.1",
|
|
40
|
+
"@ultimat3/cache": "27.16.1",
|
|
41
|
+
"@ultimat3/core": "27.16.1",
|
|
42
|
+
"@ultimat3/db": "27.16.1",
|
|
43
|
+
"@ultimat3/entity": "27.16.1",
|
|
44
|
+
"@ultimat3/http": "27.16.1",
|
|
45
|
+
"@ultimat3/i18n": "27.16.1",
|
|
46
|
+
"@ultimat3/jobs": "27.16.1",
|
|
47
|
+
"@ultimat3/mail": "27.16.1",
|
|
48
|
+
"@ultimat3/policy": "27.16.1",
|
|
49
|
+
"@ultimat3/pwa": "27.16.1",
|
|
50
|
+
"@ultimat3/query": "27.16.1",
|
|
51
|
+
"@ultimat3/realtime": "27.16.1",
|
|
52
|
+
"@ultimat3/render": "27.16.1",
|
|
53
|
+
"@ultimat3/time": "27.16.1"
|
|
54
54
|
}
|
|
55
55
|
}
|