@gfdelarue/testkit 0.6.0 → 0.6.2

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.
Files changed (156) hide show
  1. package/README.md +455 -56
  2. package/bin/testkit-windows-owner-arm64.exe +0 -0
  3. package/bin/testkit-windows-owner-x64.exe +0 -0
  4. package/dist/app/bugs/batch.js +1 -0
  5. package/dist/app/bugs/ci-report.js +2 -2
  6. package/dist/app/bugs/ci-summary.js +3 -3
  7. package/dist/app/bugs/draft.js +2 -2
  8. package/dist/app/bugs/file.js +1 -1
  9. package/dist/app/bugs/guide.js +1 -1
  10. package/dist/app/bugs/record.js +1 -1
  11. package/dist/app/bugs/run-reading.js +1 -1
  12. package/dist/app/bugs/store.js +1 -1
  13. package/dist/app/campaigns/summary.js +1 -1
  14. package/dist/app/cleanup/index.js +1 -1
  15. package/dist/app/db-schema/prepare.js +1 -1
  16. package/dist/app/db-schema/refresh.js +1 -1
  17. package/dist/app/db-schema/verify.js +1 -1
  18. package/dist/app/destroy/index.js +1 -1
  19. package/dist/app/environments/config-driven.js +1 -1
  20. package/dist/app/environments/file-setup.js +1 -1
  21. package/dist/app/environments/routing.js +1 -1
  22. package/dist/app/environments/static-values.js +1 -1
  23. package/dist/app/environments/supplied.js +1 -1
  24. package/dist/app/lint/shared.js +1 -1
  25. package/dist/app/run/live-run.js +1 -1
  26. package/dist/app/run/orchestrator.js +1 -1
  27. package/dist/app/run/planning.js +1 -1
  28. package/dist/app/run/results.js +1 -1
  29. package/dist/app/run/run-finalization.js +1 -1
  30. package/dist/app/run/run-finisher.js +1 -0
  31. package/dist/app/run/setup/runtime-node-setup-protocol.js +1 -1
  32. package/dist/app/run/setup/runtime-node-setup-worker.js +1 -1
  33. package/dist/app/run/setup/runtime-node-setup.js +2 -2
  34. package/dist/app/status/runs.js +1 -1
  35. package/dist/app/stop/index.js +1 -1
  36. package/dist/app/tracker/index.js +1 -1
  37. package/dist/app/tracker/token.js +2 -2
  38. package/dist/app/typecheck/index.js +4 -4
  39. package/dist/cli/command-catalog.js +1 -1
  40. package/dist/cli/command-flags.js +1 -1
  41. package/dist/cli/commands/bug/file.js +3 -2
  42. package/dist/cli/framework/help.js +5 -5
  43. package/dist/cli/framework/parser.js +1 -1
  44. package/dist/cli/json-errors.js +1 -1
  45. package/dist/cli/renderers/bug/text.js +1 -1
  46. package/dist/cli/renderers/run/formatting.js +1 -1
  47. package/dist/config/loader/config-loader.js +1 -1
  48. package/dist/config/loader/discover-tests.js +1 -1
  49. package/dist/config/loader/discovery-result.js +1 -0
  50. package/dist/config/loader/index.js +1 -1
  51. package/dist/config/loader/runtime-isolation.js +1 -1
  52. package/dist/config/loader/skip-config.js +1 -1
  53. package/dist/config/loader/test-selection.js +1 -1
  54. package/dist/database/admin.js +5 -2
  55. package/dist/database/call-caps.js +1 -0
  56. package/dist/database/cleanup.js +1 -1
  57. package/dist/database/configured-steps.js +1 -1
  58. package/dist/database/constants.js +1 -1
  59. package/dist/database/docker-endpoint.js +1 -0
  60. package/dist/database/docker-metadata.js +2 -2
  61. package/dist/database/docker.js +5 -5
  62. package/dist/database/index.js +2 -1
  63. package/dist/database/lifecycle-cleanup.js +1 -1
  64. package/dist/database/local-postgres.js +4 -1
  65. package/dist/database/naming.js +1 -1
  66. package/dist/database/operation-deadline.js +1 -0
  67. package/dist/database/postgres/connection-check.js +1 -1
  68. package/dist/database/postgres/index.js +2 -2
  69. package/dist/database/postgres/owned-exec.js +27 -0
  70. package/dist/database/postgres/protocol.js +2 -2
  71. package/dist/database/provider.js +1 -0
  72. package/dist/database/roles.js +2 -2
  73. package/dist/database/schema-operations.js +5 -1
  74. package/dist/database/schema-source.js +3 -3
  75. package/dist/database/steps.js +1 -1
  76. package/dist/database/template-steps.js +4 -4
  77. package/dist/domain/suite-selection.js +1 -1
  78. package/dist/engines/adapters/evidence-files.js +1 -1
  79. package/dist/engines/adapters/execution.js +1 -1
  80. package/dist/engines/node-vitest/adapter/adapter.js +1 -1
  81. package/dist/engines/node-vitest/adapter/driver.js +2 -2
  82. package/dist/engines/node-vitest/runtime/runtime-input.js +1 -1
  83. package/dist/engines/playwright/adapter/adapter.js +1 -1
  84. package/dist/engines/playwright/adapter/browser-network-evidence.js +4 -0
  85. package/dist/engines/playwright/adapter/config.js +16 -6
  86. package/dist/engines/playwright/adapter/evidence.js +2 -1
  87. package/dist/engines/playwright/adapter/failure-details.js +2 -2
  88. package/dist/engines/playwright/adapter/reporter.js +1 -1
  89. package/dist/engines/playwright/runtime/browser-network.js +1 -0
  90. package/dist/engines/playwright/runtime/browser-traffic.js +1 -0
  91. package/dist/engines/playwright/runtime/chromium-environment.js +1 -0
  92. package/dist/engines/playwright/runtime/emulation.js +1 -0
  93. package/dist/engines/playwright/runtime/index.js +1 -1
  94. package/dist/engines/playwright/runtime/managed-test.js +1 -1
  95. package/dist/engines/playwright/runtime/runtime-input.js +2 -2
  96. package/dist/environment/lifecycle-controller.js +1 -1
  97. package/dist/environment/lifecycle.js +1 -1
  98. package/dist/environment/maintenance.js +1 -1
  99. package/dist/environment/run-environment.js +1 -1
  100. package/dist/environment/run-stopping.js +1 -1
  101. package/dist/environment/runtime-manager.js +1 -1
  102. package/dist/evidence/artifacts.js +5 -2
  103. package/dist/evidence/bundles.js +2 -1
  104. package/dist/evidence/compressed-artifacts.js +1 -0
  105. package/dist/evidence/environment-record.js +1 -1
  106. package/dist/evidence/index.js +1 -1
  107. package/dist/evidence/live-run-summary.js +1 -0
  108. package/dist/evidence/local-paths.js +1 -0
  109. package/dist/evidence/maintenance.js +1 -1
  110. package/dist/evidence/operation-timings.js +1 -1
  111. package/dist/evidence/redaction.js +4 -4
  112. package/dist/evidence/run-evidence.js +1 -0
  113. package/dist/evidence/setup-progress.js +1 -1
  114. package/dist/evidence/storage-inventory.js +1 -1
  115. package/dist/evidence/storage.js +2 -2
  116. package/dist/kernel/redaction-targets.js +1 -1
  117. package/dist/kernel/redaction.js +7 -4
  118. package/dist/process/engine-environment-keys.js +1 -0
  119. package/dist/process/environment-overlay.js +1 -1
  120. package/dist/process/environment.js +1 -1
  121. package/dist/process/execa-bundle.json +3 -3
  122. package/dist/process/files/evidence-writes.js +1 -0
  123. package/dist/process/files/product-dir.js +1 -1
  124. package/dist/process/host-process.js +1 -1
  125. package/dist/process/index.js +1 -1
  126. package/dist/process/lifecycle-fence.js +1 -1
  127. package/dist/process/lock-progress.js +2 -0
  128. package/dist/process/locks.js +4 -4
  129. package/dist/process/process-identity.js +1 -1
  130. package/dist/process/process.js +35 -35
  131. package/dist/process/recovery.js +1 -1
  132. package/dist/process/runs/manifest.js +1 -1
  133. package/dist/process/runs/ownership.js +1 -1
  134. package/dist/process/runs/stop.js +1 -1
  135. package/dist/process/shutdown.js +1 -1
  136. package/dist/process/windows-native.js +1 -1
  137. package/dist/repo/history.js +7 -4
  138. package/dist/repo/managed-git.js +1 -1
  139. package/dist/repo/state.js +4 -4
  140. package/dist/steps/environment.js +1 -1
  141. package/dist/toolchains/node-provisioning.js +2 -2
  142. package/dist/tracker/gitea.js +1 -1
  143. package/dist/tracker/github.js +1 -1
  144. package/dist/tracker/http.js +1 -1
  145. package/dist/tracker/ownership.js +1 -0
  146. package/dist/tracker/redaction.js +1 -1
  147. package/dist/tracker/responses.js +1 -1
  148. package/dist/types/playwright.d.ts +38 -2
  149. package/dist/types/workspace.d.ts +4 -4
  150. package/docs/bug-records.md +16 -10
  151. package/docs/engines.md +52 -4
  152. package/docs/release-notes.md +749 -0
  153. package/package.json +14 -2
  154. package/testkit-config-schema.md +36 -42
  155. package/dist/config/loader/task-policy.js +0 -1
  156. package/dist/environment/lifecycle-artifacts.js +0 -1
@@ -93,31 +93,37 @@ Testkit redacts the secrets it recognises in the title, in every section, and in
93
93
 
94
94
  - The value of a `KEY=value` assignment whose key names a secret.
95
95
  - The password in a URL.
96
- - The value of an `Authorization`, `Proxy-Authorization`, `Cookie`, or `Set-Cookie` header.
96
+ - The value of an `Authorization`, `Proxy-Authorization`, `Cookie`, `Set-Cookie`, `Api-Key`, or `X-Api-Key` header. When a double-quoted string holds the header, the value ends at the quote that closes the string, at the string's own escape depth, so a value that ends in an escaped backslash ends there too.
97
97
  - A JSON string value whose key names a secret, including JSON that is itself inside a JSON string, as in `{"message":"{\"token\":\"…\"}"}`. Testkit reads the key's escapes, so `"\u0074oken"` names a secret too.
98
- - The value of a single-quoted `'password': '…'` member, in any letter case. It ends at the next apostrophe that no backslash precedes, or with the line.
98
+ - Every string in a JSON array or object whose key names a secret, as in `{"tokens":["…"]}`, unless the key names a secret only through `AUTH`, `COOKIE`, or `SESSION`. So `session` and `auth` settings stay. In an object with a `name` string and a `value` string, only the `value` and members whose own key names a secret count. Numbers and booleans stay. In a `cookies` array, the `value` string of each object directly in it counts, and the rules above still apply inside it.
99
+ - The value of a single-quoted member whose key names a secret, as in `{'token': '…'}`. It ends at the next apostrophe that no backslash precedes, or with the line.
100
+ - The value after a key whose last word is `PASSWORD` or `PASSWD` and a colon, outside JSON, as in `{ password: '…' }` or a YAML `password: …` line. A quoted value counts anywhere and ends as a quoted assigned value does. An unquoted value counts at the start of a line, after spaces and an optional `- `, when it is the line's one word. A value that is one word of letters, perhaps followed by `.`, `,`, `;`, `:`, `!`, `?`, or `)`, stays, so `password: 'Required'`, `password: required!`, and `rejects a password: too short` stay as they are.
101
+ - The token after `Bearer` and a space or a tab, wherever it appears, when it is at least eight characters long and holds a digit. The token is made of letters, digits, `-`, `.`, `_`, `~`, `+`, and `/`, and may end in `=` signs. `Bearer authentication` stays as it is.
102
+ - The value in a `"name": "…", "value": "…"` pair whose name names a secret, as traces store headers, as in `{"name":"Authorization","value":"…"}`.
99
103
 
100
- A key names a secret when it contains `PASSWORD`, `TOKEN`, `SECRET`, `PRIVATE_KEY`, `AUTH`, `COOKIE`, `SESSION`, or `API_KEY` in any letter case. Still keep credentials, tokens, and passwords out of the record.
104
+ A key names a secret when it contains `PASSWORD`, `TOKEN`, `SECRET`, `PRIVATE_KEY`, `AUTH`, `COOKIE`, `SESSION`, or `API_KEY` in any letter case, or when its last word is `PASS`, `PASSWD`, `PAT`, `DSN`, `CREDENTIAL`, or `CREDENTIALS`. `AUTH` doesn't count in `AUTHOR` or `AUTHORITY`, so `GIT_AUTHOR_NAME` and `author` name no secret, though `AUTHORIZATION` and `AUTHORISE` still do. `SESSION` doesn't count when an optional `S`, at most one other character, and then `COUNT`, `DURATION`, `EXPIR`, `LENGTH`, `LIMIT`, `MAX`, `TIMEOUT`, or `TTL` follow it, as in `sessionCount` and `SESSION_TIMEOUT`. A key whose last two words are `API`, `PRIVATE`, `SIGNING`, or `ENCRYPTION` and then `KEY`, as in `apiKey`, `x-api-key`, and `privateKey`, names a secret too, and so does an upper-case key whose last word is `KEY`, such as `STRIPE_KEY` or `SIGNING_KEY`, unless the word before it is `PUBLIC` or `PUBLISHABLE`. Words break at any character other than a letter or a digit, and before an upper-case letter that follows a lower-case letter or a digit, so `GITHUB_PAT` and `dbPass` name secrets and `PATH`, `BYPASS`, and `cacheKey` don't. Still keep credentials, tokens, and passwords out of the record.
101
105
 
102
106
  An assigned value ends at the first space, with four exceptions.
103
107
 
104
108
  - A value that starts with `"` or `'` ends at the next such quote on its line. When the line has no such quote, the value ends with the line.
105
109
  - A quoted value inside a JSON string (`\"`), or inside JSON that is itself inside a JSON string (`\\\"`), ends at the next quote escaped to the same depth. A quote escaped more deeply belongs to the value. The value ends sooner at a quote escaped less deeply, such as the quote that closes the JSON string, at an escaped line break at its own depth or less, or with the line. A value quoted with an escaped apostrophe, `\'`, works the same way. JSON doesn't escape apostrophes, so each JSON layer only doubles the backslashes (`\\'`). A plain apostrophe inside the value belongs to it.
106
110
  - A value that starts with `Basic`, `Bearer`, `Digest`, `Negotiate`, or `Token` and then a space or a tab ends with the line.
107
- - Under a key that ends in `_URL`, Testkit keeps a value that starts with a scheme, such as `https://`, and redacts the URL's password only.
111
+ - Under a key that ends in `_URL`, Testkit keeps a value that starts with a scheme, such as `https://`, or with a single `/`, such as `/oauth/authorize`. A value that starts with `//` is redacted whole. It redacts what the other rules find in it, such as the URL's password or a `token=` query parameter.
108
112
 
109
- When `testkit run` stores a result, it redacts JSON one string value at a time. That covers text that is a JSON object, array, or string, and a line whose text from its first `{` or `[` is JSON. Each string value gets the rules above, and so does JSON inside a string. A value that runs to a space or to the end of its line therefore ends with its string, and the record's other values stay as they are. Other text gets the rules as written, and so does JSON in two cases:
113
+ When `testkit run` stores a result, it redacts JSON one string value at a time. That covers text that is a JSON object, array, or string, and a line whose text from its first `{` or `[` is JSON. Each string value gets the rules above, and so does JSON inside a string. A value that runs to a space or to the end of its line therefore ends with its string, and the record's other values stay as they are. In an object with `name` and `value` members, in either order, the `value` string is redacted when the name names a secret, and always when the object is in a `cookies` array. Other text gets the rules as written, and so does JSON in two cases:
110
114
 
111
115
  - a rule reading the whole line would redact across the line's first `{` or `[`;
112
116
  - a secret Testkit resolved from the run's environment, whole or cut short, crosses the JSON's edge or spans more than one string.
113
117
 
114
118
  A string that holds such a secret in escaped form is redacted as decoded text when the escaped text decodes to the secret, or, for a secret cut short, to the start of one, and redacted whole otherwise. Where these rules and a resolved secret overlap, Testkit redacts every character that either would redact.
115
119
 
120
+ Testkit applies every rule to the same text and redacts each character that any rule finds. A value that runs to a space therefore doesn't hide the secret after it, so `PASSWORD=…"Cookie: sid=…` loses both.
121
+
116
122
  Testkit writes `<redacted>` in place of the value. A quoted value keeps its quotes, as in `PASSWORD="<redacted>"`, so redacting the text again changes nothing. A `<redacted>` that the text already holds counts as part of the value, so `TOKEN=<redacted>example-secret` becomes `TOKEN=<redacted>`. A secret resolved from the run's environment can itself contain part of `<redacted>`, or a character Testkit reserves. Such a secret can match text that redaction creates, so where it takes part, `testkit run` redacts the whole line of a log, or the whole JSON string, when it stores the result. When such a secret spans lines, or takes part only across lines, `testkit run` redacts every line between the nearest JSON lines instead, or the whole text when it holds none.
117
123
 
118
- A URL password is the text between `://user:` and the last `@` before the next `/` or space. The user can be empty, as in `redis://:password@cache`. Testkit does not recognise a password that holds a `/`, or a token that stands alone as the user, as in `https://token@host`.
124
+ A URL password is the text after `://user:`, up to the first `@` whose host runs to a `/`, `?`, `#`, space, or the end of the text with no other `@`. The user can be empty, as in `redis://:password@cache`. The password can hold `/` and `@`, as in `postgres://app:pa/ss@db`, A password that starts with digits and then a `/`, `?`, or `#`, and also ends with one of them before the `@`, reads as a port and a path, so `https://registry.example.com:8443/@scope/pkg` stays and `postgres://app:1234/secret@db` loses `1234/secret`. The user can't hold `[` or `]`, so an IPv6 host such as `http://[::1]:5173/@vite/client` stays. A directory name keeps one slash of a URL, so Testkit also reads `postgres:/app:password@db`. In an `http` or `https` URL, a user that stands alone, as in `https://token@host`, is redacted when it is at least 20 characters of letters, digits, `-`, `.`, `_`, and `~`, and holds a digit, so `https://ada@host` and `ssh://deploy2024@host` stay.
119
125
 
120
- Testkit does not rewrite a path or an area's name. `testkit bug record` rejects a record whose `test.file` or `fault.path` holds text that Testkit redacts. `testkit bug file` stops when the area's name or the reproduce command holds such text.
126
+ Testkit does not rewrite a path or an area's name. `testkit bug record` rejects a record whose `test.file`, `fault.path`, or reproduce command holds text that Testkit redacts. The reproduce command holds the product directory's path, the test's path from it, and the `--vitest-config` and `--vitest-project` selectors. `testkit bug file` stops when the area's name or the reproduce command holds such text.
121
127
 
122
128
  Testkit reads the facts back from the body before it files the issue. It files nothing when they do not read back as written. That happens when `test.title`, `test.file`, `fault.path`, or the area's name holds one of the two marker comments.
123
129
 
@@ -234,7 +240,7 @@ A named failure's title comes from the engine.
234
240
  | Vitest | The names of the `describe` blocks around the test and the test's own name, joined by single spaces. |
235
241
  | Playwright | The names of the `describe` blocks around the spec and the spec's own title, joined by single spaces. |
236
242
 
237
- A Playwright title holds neither the file path nor the project name. A spec that fails in two projects is one named failure.
243
+ A Playwright title holds neither the file path nor the project name. A spec that fails in two projects is one named failure. When a Playwright config sets `failOnFlakyTests`, a spec that passes only on a retry fails the run, and it is a named failure.
238
244
 
239
245
  When a file reports named failures, `testkit bug file` rejects a bug record whose `test.title` is not one of their titles. Its message lists the titles a bug record can use.
240
246
 
@@ -248,8 +254,8 @@ A file also reports one unnamed failure beside its named failures when the engin
248
254
 
249
255
  - A Vitest file runs past its timeout, writes more output than Testkit keeps, or ends on a signal or with an exit code other than 1.
250
256
  - A Playwright run is interrupted or runs past its timeout.
251
- - A Playwright process ends on a signal or with an exit code other than 1. A reporter in the Playwright config that ends the process does that.
252
- - A Playwright config sets `failOnFlakyTests` and a spec passes only on a retry. A spec that passes on a retry is no named failure, so no issue can cover it.
257
+ - A Playwright process ends on a signal, with an exit code other than 1, or before every reporter in the Playwright config has finished. A reporter that ends the process from one of its hooks does that, whatever its exit code. A reporter that ends the process with exit code 1 after its hooks have returned, such as from a timer, still reads as the failed specs.
258
+ - Playwright does not run a spec of the selected file that was expected to run. A failed spec stops the later specs of a serial group, a failed `beforeAll` hook stops the specs after the one it failed, and a run that reaches `maxFailures` stops the rest. A spec that the file skips with `test.skip` or `test.fixme` is not such a spec.
253
259
  - A Playwright spec fails in a file other than the selected one, such as a spec in a project that the selected file's project depends on or a spec in a teardown project. That spec is no named failure of the selected file, so no issue can cover it. A spec's file is the file that Playwright loaded. A compiled file whose source map names the selected file is still another file.
254
260
  - Testkit cannot keep a file that a Playwright spec attached, or cannot store the evidence of the Playwright run.
255
261
 
package/docs/engines.md CHANGED
@@ -55,6 +55,45 @@ Back restores a page from the back/forward cache, drop that flag in the file:
55
55
  test.use({ launchOptions: { ignoreDefaultArgs: ["--disable-back-forward-cache"] } });
56
56
  ```
57
57
 
58
+ Testkit starts managed Chromium with its sandbox on, which confines a
59
+ compromised renderer. Playwright on its own starts Chromium with
60
+ `--no-sandbox`, where a renderer runs with the user's access to the checkout and
61
+ their files. A project's `launchOptions` and a file's `test.use` keep the
62
+ config's `chromiumSandbox` unless they set it.
63
+
64
+ Some hosts can't start the sandbox, such as root in a container, or a Linux host
65
+ that doesn't allow unprivileged user namespaces. There Chromium fails to launch,
66
+ and Testkit reports an infrastructure failure that names the opt-out. Turn the
67
+ sandbox off in `playwright.config.ts`:
68
+
69
+ ```ts
70
+ export default defineTestkitConfig({
71
+ use: { launchOptions: { chromiumSandbox: false } },
72
+ });
73
+ ```
74
+
75
+ `playwright.config.ts` sees only the environment that its group's services
76
+ declare, so to turn the sandbox off on one host only, pass the host's variable
77
+ through a service's `env` in `testkit.config.ts` and read it in
78
+ `playwright.config.ts`:
79
+
80
+ ```ts
81
+ // testkit.config.ts, in a service the UI group uses
82
+ env: { CHROMIUM_SANDBOX: process.env.CHROMIUM_SANDBOX ?? "on" },
83
+
84
+ // playwright.config.ts
85
+ use: { launchOptions: { chromiumSandbox: process.env.CHROMIUM_SANDBOX !== "off" } },
86
+ ```
87
+
88
+ `app.node(...)` and `app.next(...)` take the same value as
89
+ `env: { values: { CHROMIUM_SANDBOX: … } }`.
90
+
91
+ The config's value also applies to browsers that `globalSetup` and
92
+ `globalTeardown` launch.
93
+
94
+ A file can turn it off for itself with
95
+ `test.use({ launchOptions: { chromiumSandbox: false } })`.
96
+
58
97
  ## Typechecking
59
98
 
60
99
  `testkit typecheck` groups the discovered test files by engine and by their
@@ -83,7 +122,14 @@ over conflicting consumer packages. A helper shared by several engines must
83
122
  typecheck in each engine's program. Testkit's generated configs don't set
84
123
  `baseUrl`, so they need no deprecation suppression and you never edit them.
85
124
  Aliases inherited from a config with `baseUrl` keep their target directory and
86
- fallback order.
125
+ fallback order. The generated configs also clear the inherited output paths,
126
+ `outDir`, `outFile`, `declarationDir`, `sourceRoot`, `mapRoot`, and, for test
127
+ programs, `rootDir`. TypeScript holds every file to an explicit `rootDir`, and
128
+ when an output path is set without one, TypeScript 6 uses the tsconfig's own
129
+ directory. With both cleared, a test file outside the tsconfig's `rootDir`, or
130
+ outside TypeScript 6's default, still type-checks. When the tsconfig sets `incremental`
131
+ or `composite`, Testkit writes its build info beside the generated config in
132
+ `.testkit/_typecheck`, never over the repository's own.
87
133
 
88
134
  A plain file's program also includes the TypeScript setup files of its Vitest
89
135
  project, because Vitest loads them before the file and a setup file can declare
@@ -123,8 +169,10 @@ support files that join the Playwright program. Use it for global setup and
123
169
  teardown, reporters, fixtures, and dependency and teardown projects, including
124
170
  every variant of a multi-project config. An empty companion can supply options
125
171
  alone. Without a companion, Testkit checks the implicit roots, what they import,
126
- and the existing Next ambient and fixture defaults. Project references don't
127
- run.
172
+ and the existing Next ambient and fixture defaults. A companion replaces those
173
+ Next defaults: list `next-env.d.ts`, `tests/playwright-fixtures`, or generated
174
+ types such as `.next/types` in it when the suites need them. Project references
175
+ don't run.
128
176
 
129
177
  TypeScript follows imported helpers, but it can't find a file that only a
130
178
  runtime string or function names. Include those files in the companion.
@@ -183,7 +231,7 @@ environment:
183
231
  | Engine | Reserved prefixes | Other reserved keys | Consumer environment limit |
184
232
  | ------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
185
233
  | `node-vitest` | none | `BASE_URL`, `FORCE_COLOR`, `NODE_OPTIONS`, `NO_COLOR`, `UPDATE_SNAPSHOT`, `VITEST_POOL_ID`, `VITEST_WORKER_ID`, `TESTKIT_ACTIVE`, `TESTKIT_DATA_ARTIFACT_DIR`, `TESTKIT_INVOCATION_ID`, `TESTKIT_LEASE_DIR`, `TESTKIT_LEASE_ID`, `TESTKIT_MODE`, `TESTKIT_NODE_VITEST_INPUT_FILE`, `TESTKIT_NODE_VITEST_INPUT_SHA256`, `TESTKIT_RUNTIME_ID`, `TESTKIT_TEST_FILE`, `TESTKIT_TEST_ID` | 512 entries and 4 MiB of UTF-8 key/value data; 8 MiB for all of the test's inputs together |
186
- | `playwright` | `TESTKIT_`, `PLAYWRIGHT_`, `PWTEST_`, `PW_TEST_` | `BASE_URL`, `FORCE_COLOR`, `NODE_OPTIONS`, `NO_COLOR` | 512 entries and 2 MiB of UTF-8 key/value data; 4 MiB for all of the test's inputs together |
234
+ | `playwright` | `TESTKIT_`, `PLAYWRIGHT_`, `PWTEST_`, `PW_TEST_` | `BASE_URL`, `DBUS_SESSION_BUS_ADDRESS`, `FC_FONTATIONS`, `FORCE_COLOR`, `NODE_OPTIONS`, `NO_COLOR` | 512 entries and 2 MiB of UTF-8 key/value data; 4 MiB for all of the test's inputs together |
187
235
 
188
236
  Prefixes and keys match in any letter case. The processes Testkit starts have
189
237
  separate environment limits, which consumer values don't count toward: 24,576