@jterrazz/test 16.1.1 → 18.0.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.
Files changed (309) hide show
  1. package/README.md +45 -171
  2. package/dist/browser/index.js +1 -2980
  3. package/dist/browser/services.js +1 -0
  4. package/dist/browser/stubs.js +1 -0
  5. package/dist/browser-shared-index.browser.js +3233 -0
  6. package/dist/checker.d.ts +6 -1
  7. package/dist/checker.js +3721 -2624
  8. package/dist/config.d.ts +40 -0
  9. package/dist/config.js +309 -0
  10. package/dist/in-place.global-setup.d.ts +12 -0
  11. package/dist/in-place.global-setup.js +21 -0
  12. package/dist/index.d.ts +1641 -3004
  13. package/dist/index.js +5095 -3835
  14. package/dist/mobile-session.global-setup.d.ts +15 -0
  15. package/dist/mobile-session.global-setup.js +31 -0
  16. package/dist/oxlint.cjs +6069 -5634
  17. package/dist/oxlint.d.cts +43 -7212
  18. package/dist/oxlint.d.ts +43 -7212
  19. package/dist/oxlint.js +3979 -5799
  20. package/dist/route-coverage.global-setup.d.ts +43 -0
  21. package/dist/route-coverage.global-setup.js +1 -0
  22. package/dist/services.d.ts +3 -0
  23. package/dist/services.global-setup.d.ts +43 -0
  24. package/dist/services.global-setup.js +1 -0
  25. package/dist/services.js +597 -0
  26. package/dist/shared-appium.adapter.js +428 -0
  27. package/dist/shared-artifacts.js +34 -0
  28. package/dist/shared-chapter.js +7 -0
  29. package/dist/shared-container.port.d.ts +31 -0
  30. package/dist/shared-derived-projects.js +73 -0
  31. package/dist/shared-device.port.d.ts +189 -0
  32. package/dist/shared-exchange.js +447 -0
  33. package/dist/shared-in-place.js +172 -0
  34. package/dist/shared-index.services.d.ts +346 -0
  35. package/dist/shared-index.stubs.d.ts +287 -0
  36. package/dist/shared-json-shape.js +17 -0
  37. package/dist/shared-landmarks.js +71 -0
  38. package/dist/shared-ledger.js +68 -0
  39. package/dist/shared-listened-port.js +19 -0
  40. package/dist/shared-literate-plugin.js +184 -0
  41. package/dist/shared-manifest.js +1321 -0
  42. package/dist/shared-pause.js +22 -0
  43. package/dist/shared-peer.js +88 -0
  44. package/dist/shared-playwright.adapter.js +328 -0
  45. package/dist/shared-process-alive.js +13 -0
  46. package/dist/shared-process.adapter.js +74 -0
  47. package/dist/shared-record-key.js +13 -0
  48. package/dist/shared-refusal.js +35 -0
  49. package/dist/shared-resolve.js +24 -0
  50. package/dist/shared-route-coverage.global-setup.js +187 -0
  51. package/dist/shared-scenario-failure.js +198 -0
  52. package/dist/shared-serve.js +407 -0
  53. package/dist/shared-service-images.js +10 -0
  54. package/dist/shared-services.global-setup.js +174 -0
  55. package/dist/shared-session-ledger.js +305 -0
  56. package/dist/shared-setup-entry.js +12 -0
  57. package/dist/shared-source-scan.js +133 -0
  58. package/dist/shared-spec-document.js +303 -0
  59. package/dist/shared-spec-grammar.js +66 -0
  60. package/dist/shared-specifications.js +26 -0
  61. package/dist/shared-specs-modules.js +1033 -0
  62. package/dist/shared-stub-reply.js +167 -0
  63. package/dist/shared-stub-server.js +142 -0
  64. package/dist/shared-temp-root.global-setup.js +73 -0
  65. package/dist/shared-test-baseline.js +26 -0
  66. package/dist/shared-test-section.js +58 -0
  67. package/dist/shared-testcontainers.adapter.js +306 -0
  68. package/dist/shared-tokens.js +55 -0
  69. package/dist/shared-yaml-document.js +119 -0
  70. package/dist/stubs.d.ts +2 -0
  71. package/dist/stubs.js +657 -0
  72. package/dist/temp-root.global-setup.d.ts +7 -0
  73. package/dist/temp-root.global-setup.js +1 -0
  74. package/dist/vitest.d.ts +93 -164
  75. package/dist/vitest.js +382 -550
  76. package/docs/README.md +82 -36
  77. package/docs/concepts/architecture.md +118 -0
  78. package/docs/concepts/conventions.md +333 -0
  79. package/docs/guides/api-specs.md +374 -0
  80. package/docs/guides/cli-specs.md +566 -0
  81. package/docs/guides/component-specs.md +252 -0
  82. package/docs/guides/develop.md +97 -0
  83. package/docs/guides/integration-specs.md +181 -0
  84. package/docs/guides/job-specs.md +180 -0
  85. package/docs/guides/lint-specs.md +174 -0
  86. package/docs/guides/mobile-specs.md +319 -0
  87. package/docs/guides/module-tests.md +149 -0
  88. package/docs/guides/release.md +44 -0
  89. package/docs/guides/spec-documents.md +189 -0
  90. package/docs/guides/website-specs.md +413 -0
  91. package/docs/reference/assertions.md +345 -0
  92. package/docs/reference/glossary.md +20 -0
  93. package/docs/reference/linting.md +483 -0
  94. package/docs/reference/services.md +236 -0
  95. package/docs/reference/stubs.md +500 -0
  96. package/docs/reference/time-and-doubles.md +137 -0
  97. package/docs/reference/tokens.md +258 -0
  98. package/docs/reference/visitor.md +221 -0
  99. package/docs/start/getting-started.md +187 -0
  100. package/docs/start/set-up-a-project.md +228 -0
  101. package/package.json +56 -36
  102. package/schema/spec.schema.json +43 -17
  103. package/dist/appium.adapter.js +0 -489
  104. package/dist/artifacts.js +0 -32
  105. package/dist/fixtures.js +0 -110
  106. package/dist/literate.js +0 -1747
  107. package/dist/match.js +0 -804
  108. package/dist/playwright.adapter.js +0 -438
  109. package/dist/server.js +0 -160
  110. package/dist/stream.js +0 -321
  111. package/dist/substring-warning.js +0 -282
  112. package/docs/01-architecture.md +0 -95
  113. package/docs/02-developing.md +0 -351
  114. package/docs/03-testing.md +0 -495
  115. package/docs/04-operating.md +0 -101
  116. package/docs/05-module-tests.md +0 -152
  117. package/docs/06-integration.md +0 -180
  118. package/docs/07-component.md +0 -246
  119. package/docs/08-website.md +0 -404
  120. package/docs/09-mobile.md +0 -270
  121. package/docs/10-api.md +0 -264
  122. package/docs/11-jobs.md +0 -157
  123. package/docs/12-cli.md +0 -677
  124. package/docs/13-elements.md +0 -248
  125. package/docs/14-assertions.md +0 -314
  126. package/docs/15-tokens.md +0 -253
  127. package/docs/16-contracts.md +0 -438
  128. package/docs/17-services.md +0 -188
  129. package/docs/18-conventions.md +0 -332
  130. package/docs/19-linting.md +0 -512
  131. package/docs/decisions/001-v9-conventions-on-three-channels.md +0 -50
  132. package/docs/decisions/002-the-statique-channel-holds-only-what-upstream-does-not.md +0 -49
  133. package/docs/decisions/003-a-rendered-component-is-a-facet-on-vitest-browser-mode.md +0 -84
  134. package/docs/decisions/004-a-module-against-real-services-or-a-golden-is-the-integration-facet.md +0 -81
  135. package/docs/decisions/005-the-doubles-ladder-is-closed.md +0 -86
  136. package/docs/decisions/006-the-catalogue-reaches-a-file-by-its-role.md +0 -245
  137. package/docs/decisions/007-compose-mode-leaves-the-package.md +0 -53
  138. package/docs/decisions/008-vitest-5-node-24-and-the-native-seams-as-optional-peers.md +0 -75
  139. package/docs/decisions/_template.md +0 -22
  140. package/docs/reference/classes/Matcher.md +0 -120
  141. package/docs/reference/classes/ProcessHandle.md +0 -368
  142. package/docs/reference/functions/defineContract.md +0 -39
  143. package/docs/reference/functions/defineContracts.md +0 -36
  144. package/docs/reference/functions/disabled.md +0 -28
  145. package/docs/reference/functions/enabled.md +0 -20
  146. package/docs/reference/functions/focused.md +0 -26
  147. package/docs/reference/functions/mockOf.md +0 -79
  148. package/docs/reference/functions/postgres.md +0 -31
  149. package/docs/reference/functions/process.md +0 -33
  150. package/docs/reference/functions/redis.md +0 -28
  151. package/docs/reference/functions/required.md +0 -41
  152. package/docs/reference/functions/selected.md +0 -26
  153. package/docs/reference/functions/sqlite.md +0 -33
  154. package/docs/reference/functions/testId.md +0 -20
  155. package/docs/reference/functions/text.md +0 -40
  156. package/docs/reference/functions/valued.md +0 -28
  157. package/docs/reference/functions/waitUntil.md +0 -46
  158. package/docs/reference/functions/within.md +0 -29
  159. package/docs/reference/index.md +0 -196
  160. package/docs/reference/interfaces/BaseResult.md +0 -87
  161. package/docs/reference/interfaces/CallResult.md +0 -160
  162. package/docs/reference/interfaces/CaptureScope.md +0 -82
  163. package/docs/reference/interfaces/CliResult.md +0 -253
  164. package/docs/reference/interfaces/ContainerAccessor.md +0 -166
  165. package/docs/reference/interfaces/DirectoryAccessor.md +0 -33
  166. package/docs/reference/interfaces/FetchResult.md +0 -180
  167. package/docs/reference/interfaces/FilesystemAccessor.md +0 -46
  168. package/docs/reference/interfaces/HttpResult.md +0 -126
  169. package/docs/reference/interfaces/JsonAccessor.md +0 -46
  170. package/docs/reference/interfaces/PageResult.md +0 -356
  171. package/docs/reference/interfaces/RenderResult.md +0 -72
  172. package/docs/reference/interfaces/RenderedText.md +0 -110
  173. package/docs/reference/interfaces/ResponseAccessor.md +0 -47
  174. package/docs/reference/interfaces/ScreenResult.md +0 -128
  175. package/docs/reference/interfaces/TableAccessor.md +0 -26
  176. package/docs/reference/interfaces/TextAccessor.md +0 -96
  177. package/docs/reference/type-aliases/ApiHandle.md +0 -68
  178. package/docs/reference/type-aliases/ApiSpecification.md +0 -213
  179. package/docs/reference/type-aliases/ApiSpecificationOptions.md +0 -68
  180. package/docs/reference/type-aliases/BrowserConsoleMessage.md +0 -30
  181. package/docs/reference/type-aliases/BrowserLinkElement.md +0 -50
  182. package/docs/reference/type-aliases/BrowserMetaElement.md +0 -40
  183. package/docs/reference/type-aliases/BrowserOpenOptions.md +0 -87
  184. package/docs/reference/type-aliases/BrowserPage.md +0 -132
  185. package/docs/reference/type-aliases/BrowserPort.md +0 -51
  186. package/docs/reference/type-aliases/CliEnv.md +0 -11
  187. package/docs/reference/type-aliases/CliHandle.md +0 -80
  188. package/docs/reference/type-aliases/CliInput.md +0 -36
  189. package/docs/reference/type-aliases/CliOutput.md +0 -46
  190. package/docs/reference/type-aliases/CliPort.md +0 -58
  191. package/docs/reference/type-aliases/CliSpecification.md +0 -144
  192. package/docs/reference/type-aliases/CliSpecificationOptions.md +0 -134
  193. package/docs/reference/type-aliases/ComponentChain.md +0 -156
  194. package/docs/reference/type-aliases/ComponentScenario.md +0 -20
  195. package/docs/reference/type-aliases/ComponentUi.md +0 -47
  196. package/docs/reference/type-aliases/ComponentVisitor.md +0 -10
  197. package/docs/reference/type-aliases/ContainerPort.md +0 -113
  198. package/docs/reference/type-aliases/Contract.md +0 -68
  199. package/docs/reference/type-aliases/ContractInput.md +0 -13
  200. package/docs/reference/type-aliases/ContractRequest.md +0 -95
  201. package/docs/reference/type-aliases/ContractResponder.md +0 -23
  202. package/docs/reference/type-aliases/ContractResponse.md +0 -78
  203. package/docs/reference/type-aliases/ContractResponseValue.md +0 -13
  204. package/docs/reference/type-aliases/Contracts.md +0 -48
  205. package/docs/reference/type-aliases/DatabaseKeys.md +0 -16
  206. package/docs/reference/type-aliases/DatabasePort.md +0 -72
  207. package/docs/reference/type-aliases/DeviceOpenOptions.md +0 -46
  208. package/docs/reference/type-aliases/DevicePort.md +0 -51
  209. package/docs/reference/type-aliases/DeviceScreen.md +0 -32
  210. package/docs/reference/type-aliases/DeviceTimeouts.md +0 -39
  211. package/docs/reference/type-aliases/DockerSpecConfig.md +0 -43
  212. package/docs/reference/type-aliases/DomMount.md +0 -21
  213. package/docs/reference/type-aliases/ElementKind.md +0 -27
  214. package/docs/reference/type-aliases/ElementMatch.md +0 -74
  215. package/docs/reference/type-aliases/ElementOptions.md +0 -29
  216. package/docs/reference/type-aliases/ElementRef.md +0 -128
  217. package/docs/reference/type-aliases/ExecOptions.md +0 -37
  218. package/docs/reference/type-aliases/FileAccessor.md +0 -54
  219. package/docs/reference/type-aliases/HonoApp.md +0 -31
  220. package/docs/reference/type-aliases/HttpContractFilter.md +0 -49
  221. package/docs/reference/type-aliases/HttpResponseInit.md +0 -46
  222. package/docs/reference/type-aliases/HttpStreamInit.md +0 -58
  223. package/docs/reference/type-aliases/IntegrationHandle.md +0 -46
  224. package/docs/reference/type-aliases/IntegrationSpecification.md +0 -111
  225. package/docs/reference/type-aliases/IntegrationSpecificationOptions.md +0 -42
  226. package/docs/reference/type-aliases/Intercept.md +0 -19
  227. package/docs/reference/type-aliases/InterceptOptions.md +0 -28
  228. package/docs/reference/type-aliases/InterceptScope.md +0 -11
  229. package/docs/reference/type-aliases/IsolationStrategy.md +0 -75
  230. package/docs/reference/type-aliases/JobHandle.md +0 -34
  231. package/docs/reference/type-aliases/JobsHandle.md +0 -57
  232. package/docs/reference/type-aliases/JobsResult.md +0 -16
  233. package/docs/reference/type-aliases/JobsSpecification.md +0 -94
  234. package/docs/reference/type-aliases/JobsSpecificationOptions.md +0 -56
  235. package/docs/reference/type-aliases/LandmarkKind.md +0 -20
  236. package/docs/reference/type-aliases/LiterateRunFlags.md +0 -27
  237. package/docs/reference/type-aliases/LiterateServeRegistration.md +0 -70
  238. package/docs/reference/type-aliases/MatchFixtureOptions.md +0 -27
  239. package/docs/reference/type-aliases/MatchableRequest.md +0 -61
  240. package/docs/reference/type-aliases/MatcherKind.md +0 -34
  241. package/docs/reference/type-aliases/MobileBackendOptions.md +0 -28
  242. package/docs/reference/type-aliases/MobileElementKind.md +0 -14
  243. package/docs/reference/type-aliases/MobileElementMatch.md +0 -60
  244. package/docs/reference/type-aliases/MobileElementRef.md +0 -20
  245. package/docs/reference/type-aliases/MobileHandle.md +0 -65
  246. package/docs/reference/type-aliases/MobileScenario.md +0 -20
  247. package/docs/reference/type-aliases/MobileSpecification.md +0 -51
  248. package/docs/reference/type-aliases/MobileSpecificationOptions.md +0 -126
  249. package/docs/reference/type-aliases/MobileVisitor.md +0 -81
  250. package/docs/reference/type-aliases/MockOfOptions.md +0 -26
  251. package/docs/reference/type-aliases/MockPort.md +0 -10
  252. package/docs/reference/type-aliases/PinnedClock.md +0 -10
  253. package/docs/reference/type-aliases/PostgresOptions.md +0 -32
  254. package/docs/reference/type-aliases/ProcessOptions.md +0 -112
  255. package/docs/reference/type-aliases/RedisOptions.md +0 -20
  256. package/docs/reference/type-aliases/RenderSubject.md +0 -12
  257. package/docs/reference/type-aliases/ScreenNode.md +0 -67
  258. package/docs/reference/type-aliases/ServerPort.md +0 -36
  259. package/docs/reference/type-aliases/ServerResponse.md +0 -46
  260. package/docs/reference/type-aliases/ServerSpec.md +0 -21
  261. package/docs/reference/type-aliases/ServiceHandle.md +0 -216
  262. package/docs/reference/type-aliases/ServiceRecord.md +0 -12
  263. package/docs/reference/type-aliases/SpecDocument.md +0 -84
  264. package/docs/reference/type-aliases/SpecEnvToken.md +0 -21
  265. package/docs/reference/type-aliases/SpecFileAssertion.md +0 -27
  266. package/docs/reference/type-aliases/SpecFixture.md +0 -30
  267. package/docs/reference/type-aliases/SpecKind.md +0 -8
  268. package/docs/reference/type-aliases/SpecRun.md +0 -108
  269. package/docs/reference/type-aliases/SpecServeEntry.md +0 -40
  270. package/docs/reference/type-aliases/SpecStream.md +0 -32
  271. package/docs/reference/type-aliases/SpecificationConfig.md +0 -290
  272. package/docs/reference/type-aliases/SqliteOptions.md +0 -36
  273. package/docs/reference/type-aliases/SseEvent.md +0 -58
  274. package/docs/reference/type-aliases/StreamBody.md +0 -61
  275. package/docs/reference/type-aliases/TextFilter.md +0 -22
  276. package/docs/reference/type-aliases/VisitScenario.md +0 -20
  277. package/docs/reference/type-aliases/Visitor.md +0 -215
  278. package/docs/reference/type-aliases/WaitUntilOptions.md +0 -46
  279. package/docs/reference/type-aliases/WebsiteBackendOptions.md +0 -37
  280. package/docs/reference/type-aliases/WebsiteHandle.md +0 -51
  281. package/docs/reference/type-aliases/WebsiteSpecification.md +0 -118
  282. package/docs/reference/type-aliases/WebsiteSpecificationOptions.md +0 -40
  283. package/docs/reference/variables/anthropic.md +0 -19
  284. package/docs/reference/variables/banner.md +0 -10
  285. package/docs/reference/variables/button.md +0 -10
  286. package/docs/reference/variables/clock.md +0 -16
  287. package/docs/reference/variables/complementary.md +0 -10
  288. package/docs/reference/variables/component.md +0 -10
  289. package/docs/reference/variables/content.md +0 -10
  290. package/docs/reference/variables/contentinfo.md +0 -10
  291. package/docs/reference/variables/dialog.md +0 -10
  292. package/docs/reference/variables/field.md +0 -10
  293. package/docs/reference/variables/form.md +0 -10
  294. package/docs/reference/variables/heading.md +0 -10
  295. package/docs/reference/variables/http.md +0 -40
  296. package/docs/reference/variables/intercept.md +0 -11
  297. package/docs/reference/variables/link.md +0 -10
  298. package/docs/reference/variables/listitem.md +0 -10
  299. package/docs/reference/variables/main.md +0 -10
  300. package/docs/reference/variables/match.md +0 -8
  301. package/docs/reference/variables/navigation.md +0 -10
  302. package/docs/reference/variables/openai.md +0 -21
  303. package/docs/reference/variables/option.md +0 -17
  304. package/docs/reference/variables/region.md +0 -10
  305. package/docs/reference/variables/row.md +0 -10
  306. package/docs/reference/variables/search.md +0 -10
  307. package/docs/reference/variables/specification.md +0 -8
  308. package/docs/reference/variables/status.md +0 -10
  309. package/docs/reference/variables/table.md +0 -10
package/dist/vitest.d.ts CHANGED
@@ -1,36 +1,46 @@
1
+ import { a as MobileDevice } from "./shared-device.port.js";
1
2
  import { TestProjectInlineConfiguration, ViteUserConfig } from "vitest/config";
2
3
  import { UserConfig, UserConfigFn } from "vite";
3
- //#region src/runner/literate-plugin.d.ts
4
+ //#region src/vitest/project.d.ts
5
+ /** What every helper accepts on top of its canonical project. */
6
+ type SpecificationProjectOptions = {
7
+ /** Globs to stay out of: added to the preset's on a specification helper, replacing the canonical ones on `unit()` and `component()`. */
8
+ exclude?: string[];
9
+ /** Replace the canonical `include` globs. */
10
+ include?: string[];
11
+ /** Run files one at a time, for specifications sharing a served app, a database file or a browser profile. */
12
+ serial?: boolean;
13
+ /** Raise (or lower) the 30s budget for this project alone: each test's, and each hook's, which tears down what the test stood on. */
14
+ timeout?: number;
15
+ };
16
+ /** What a specification whose spec files import their runner from its specification modules accepts on top. */
17
+ type RunnerOption = {
18
+ /** The `*.specification.ts` modules its spec files import their runner from: stated, a worker's files share one module graph and each module runs again before each file, so every file still boots its own subject. */
19
+ runner?: readonly string[] | string;
20
+ };
21
+ /** What a specification whose runner boots its subject in this process accepts on top. */
22
+ type InProcessProjectOptions = RunnerOption & SpecificationProjectOptions;
23
+ //#endregion
24
+ //#region src/specifications/api/api.project.d.ts
25
+ /** `api()`: the app met through HTTP. */
26
+ type ApiProjectOptions = InProcessProjectOptions;
27
+ export declare function api(options?: ApiProjectOptions): TestProjectInlineConfiguration;
28
+ //#endregion
29
+ //#region src/specifications/cli/documents/literate-plugin.d.ts
4
30
  type LiterateOptions = {
5
- /**
6
- * Globs added to the project's test include. Default: every `.spec.yaml`
7
- * file. Narrow it when a tree holds documents that are INPUTS to other
8
- * specs (a deliberately-wrong golden) rather than scenarios to run.
9
- */
31
+ /** Globs added to the test include; narrow it when a tree holds documents that are inputs to other specs. */
10
32
  include?: string[];
11
- /**
12
- * Path to the `*.specification.ts` whose exported `cli` runs the files —
13
- * relative to the vite root, or absolute.
14
- *
15
- * It is stated, never guessed: a repository may declare several cli
16
- * runners (different binaries, different service records), and there is no
17
- * convention that could pick the right one without silently binding a
18
- * scenario to the wrong command.
19
- */
20
- specification: string;
33
+ /** Path to the `*.specification.ts` whose export named for each document's `kind:` runs it; stated, never guessed. */
34
+ runner: string;
21
35
  };
22
- /**
23
- * The shape vite consumes. Declared structurally rather than imported from
24
- * `vite`, so the package's runner coupling stays the one dependency it already
25
- * has (CONVENTIONS I1) — the object is assignable to vite's `Plugin`.
26
- */
36
+ /** Structural, so the runner coupling stays one dependency (the layer map); assignable to vite's `Plugin`. */
27
37
  type LiteratePlugin = {
28
38
  config: () => {
29
39
  test: {
30
40
  include: string[];
31
41
  };
32
42
  };
33
- /** Vite hands the resolved root here — what a relative `specification` is resolved against. */
43
+ /** Vite hands the resolved root here: what a relative `runner` is resolved against. */
34
44
  configResolved: (resolved: {
35
45
  root: string;
36
46
  }) => void;
@@ -38,170 +48,89 @@ type LiteratePlugin = {
38
48
  load: (id: string) => null | string;
39
49
  name: string;
40
50
  };
41
- declare function literate(options: LiterateOptions): LiteratePlugin;
51
+ export declare function literate(options: LiterateOptions): LiteratePlugin;
42
52
  //#endregion
43
- //#region src/runner/preset.d.ts
44
- /**
45
- * Options are a vite/vitest config plus one key of the framework's own.
46
- * Everything stated here wins over the preset's defaults.
47
- */
48
- type SpecConfig = {
49
- /**
50
- * Turns every matching `<case>.spec.yaml` into a test file bound to the
51
- * named specification — the {@link literate} plugin, added to `plugins`.
52
- *
53
- * Declare it here for a config with no `projects`. With projects, the glob
54
- * has to join the include of the ONE project that collects those documents,
55
- * so the plugin goes in that project's own `plugins` instead.
56
- */
57
- literate?: LiterateOptions;
58
- } & ViteUserConfig;
59
- declare function defineSpecConfig(config?: SpecConfig): ViteUserConfig;
60
- //#endregion
61
- //#region src/runner/facet-project.d.ts
62
- /**
63
- * The node facets' canonical projects.
64
- *
65
- * Each one collects the facet's own tree — `specs/<facet>/**\/*.spec.ts`, the
66
- * suffix that says "the assembled product" — carries the preset's budgets and
67
- * artefact directory, and runs in group 0 — the browser facets follow, so two
68
- * Chromiums never share a slot on a two-vCPU runner. `{ include, exclude,
69
- * timeout, serial }` is what a repository states when its tree, its budget or
70
- * its parallelism differs;
71
- * everything else is the framework's.
72
- */
73
- /** What every helper accepts on top of its canonical project. */
74
- type FacetProjectOptions = {
75
- /**
76
- * Globs this project stays out of. On a facet helper they ADD to the
77
- * preset's (`_fixtures/` and vitest's own), because vite concatenates. On
78
- * `unit()` and `component()`, whose canonical `exclude` exists only to
79
- * guard their canonical `include`, stating one replaces it — so state
80
- * both or neither there.
81
- */
82
- exclude?: string[];
83
- /** Replace the canonical `include` globs. */
84
- include?: string[];
85
- /**
86
- * Run this project's files ONE AT A TIME (`fileParallelism: false`) — for
87
- * the facets whose files share something a second worker would collide
88
- * with: one served app, one database file, one browser profile.
89
- */
90
- serial?: boolean;
91
- /** Raise (or lower) the 30s budget for this project alone. */
92
- timeout?: number;
93
- };
94
- //#endregion
95
- //#region src/facets/api/api.project.d.ts
96
- /** `api()` — the app met through HTTP. */
97
- declare function api(options?: FacetProjectOptions): TestProjectInlineConfiguration;
98
- //#endregion
99
- //#region src/facets/cli/cli.project.d.ts
100
- /** `cli()` — a binary, and the documents that specify it. */
101
- type CliProjectOptions = FacetProjectOptions & {
102
- /**
103
- * The literate door, wired by default: every `specs/cli/**\/*.spec.yaml`
104
- * becomes a test file bound to `specs/cli/cli.specification.ts`. State
105
- * `specification` to name another runner, `include` to narrow the glob, or
106
- * `false` to collect no documents at all.
107
- */
53
+ //#region src/specifications/cli/cli.project.d.ts
54
+ /** The literate door of the specification that reads documents: the cli. */
55
+ type LiterateDoor = {
56
+ /** Every `specs/cli/` `.spec.yaml` becomes a test bound to `specs/cli/cli.specification.ts`; `false` collects none. */
108
57
  literate?: false | Partial<LiterateOptions>;
109
58
  };
110
- /**
111
- * A cli project collects the facet's `.test.ts` files AND its documents: a
112
- * `<case>.spec.yaml` is a test file of its own (docs/07 § the literate door),
113
- * so the plugin's glob has to join the include of the project that collects
114
- * them — which is this one, never the root config.
115
- */
116
- declare function cli(options?: CliProjectOptions): TestProjectInlineConfiguration;
59
+ /** `cli()`: a binary, and the documents that specify it. */
60
+ type CliProjectOptions = LiterateDoor & RunnerOption & SpecificationProjectOptions;
61
+ /** A cli project: the specification's `.spec.ts` files and its documents (docs/guides/spec-documents.md); the plugin's glob joins this project's include, never the root config. */
62
+ export declare function cli(options?: CliProjectOptions): TestProjectInlineConfiguration;
117
63
  //#endregion
118
- //#region src/facets/component/component.project.d.ts
119
- /** `component()` — rendered units, beside the components they cover. */
120
- type ComponentProjectOptions = {
64
+ //#region src/specifications/component/component.project.d.ts
65
+ type ComponentOptions = {
121
66
  /** Freeze the page's `Date` for every render of the project. */
122
67
  clock?: string;
123
68
  /** `Accept-Language` and `Intl` locale of the page. Default `'en-US'`. */
124
69
  locale?: string;
125
- /**
126
- * The directory `vite` and `wrap` are resolved against. Default: the
127
- * directory of the file that CALLED the helper — see
128
- * {@link callerDirectory}. State it when the call is not written in the
129
- * config it configures (a shared config factory).
130
- */
131
- root?: string;
70
+ /** The directory `vite` and `wrap` resolve against, absolute; `vitestConfig` hands it the project root, or the `root` a declared project states read from it. */
71
+ root: string;
132
72
  /** IANA zone the page's `Date` reports in. Default `'UTC'`. */
133
73
  timezone?: string;
134
- /**
135
- * The app's own Vite pipeline: a config path, the object, or the function
136
- * a framework exports. Only the PIPELINE is adopted (see {@link reroot}).
137
- */
74
+ /** The app's Vite pipeline: a config path, the object, or a framework's function. Only the pipeline is adopted. */
138
75
  vite?: Promise<UserConfig> | string | UserConfig | UserConfigFn;
139
76
  /** The page size every render gets. Default 1280×720. */
140
77
  viewport?: {
141
78
  height: number;
142
79
  width: number;
143
80
  };
144
- /**
145
- * A module whose default export is `(ui) => ReactNode` — the providers
146
- * every render of this project is dressed in (a theme, a store, an intl
147
- * provider). A router belongs on the chain instead: it is a test's Given.
148
- */
81
+ /** A module whose default export `(ui) => ReactNode` wraps every render; a router is a test's Given, on the chain. */
149
82
  wrap?: string;
150
- } & FacetProjectOptions;
151
- /**
152
- * A component test renders in a real Chromium — the browser the website facet
153
- * already drives through the same `playwright` peer.
154
- *
155
- * The default `include` reaches the whole project, so the default `exclude`
156
- * keeps it out of `specs/`, where the assembled product is specified. State
157
- * your own `include` and the exclusion is yours to state too.
158
- */
159
- declare function component(options?: ComponentProjectOptions): Promise<TestProjectInlineConfiguration>;
83
+ };
84
+ /** `component()`: rendered units, in the `__tests__/` of the folder of the components they cover; under a specs tree, beside them. */
85
+ type ComponentProjectOptions = ComponentOptions & SpecificationProjectOptions;
86
+ /** A component project: renders in a real Chromium; the default `exclude` keeps it out of `specs/`. */
87
+ export declare function component(options: ComponentProjectOptions): Promise<TestProjectInlineConfiguration>;
160
88
  //#endregion
161
- //#region src/facets/integration/integration.project.d.ts
162
- /** `integration()` — a module against real services, or against a golden. */
163
- declare function integration(options?: FacetProjectOptions): TestProjectInlineConfiguration;
89
+ //#region src/specifications/integration/integration.project.d.ts
90
+ /** `integration()`: a module against real services, or against a golden. */
91
+ type IntegrationProjectOptions = InProcessProjectOptions;
92
+ export declare function integration(options?: IntegrationProjectOptions): TestProjectInlineConfiguration;
164
93
  //#endregion
165
- //#region src/facets/jobs/jobs.project.d.ts
166
- /** `jobs()` — what a name triggers in-process. */
167
- declare function jobs(options?: FacetProjectOptions): TestProjectInlineConfiguration;
94
+ //#region src/specifications/job/job.project.d.ts
95
+ /** `job()`: the background jobs, run in this process. */
96
+ type JobProjectOptions = InProcessProjectOptions;
97
+ export declare function job(options?: JobProjectOptions): TestProjectInlineConfiguration;
168
98
  //#endregion
169
- //#region src/facets/mobile/mobile.project.d.ts
170
- /**
171
- * `mobile()` — the app on a simulator. A simulator is the one thing that
172
- * cannot share a machine with itself, so it runs last and alone (group 3).
173
- */
174
- declare function mobile(options?: FacetProjectOptions): TestProjectInlineConfiguration;
99
+ //#region src/specifications/lint/lint.project.d.ts
100
+ /** `lint()`: the rules a project ships, run by the real linters over fixture trees. */
101
+ type LintProjectOptions = SpecificationProjectOptions;
102
+ export declare function lint(options?: LintProjectOptions): TestProjectInlineConfiguration;
175
103
  //#endregion
176
- //#region src/facets/website/website.project.d.ts
177
- /** `website()` — the assembled product, met through a served page. */
178
- type WebsiteProjectOptions = FacetProjectOptions;
179
- /**
180
- * A website spec meets the assembled product through a served page, in the
181
- * Chromium playwright drives. It opens a browser, so it is scheduled before the
182
- * component project and never beside it: two Chromiums must not share a slot on
183
- * a 2-vCPU runner.
184
- */
185
- declare function website(options?: WebsiteProjectOptions): TestProjectInlineConfiguration;
104
+ //#region src/specifications/mobile/mobile.project.d.ts
105
+ /** The common options; for a run whose specs spawn no server, the device its one Appium server drives. */
106
+ type MobileProjectOptions = SpecificationProjectOptions & ({
107
+ device: MobileDevice;
108
+ root?: string;
109
+ } | {
110
+ device?: never;
111
+ root?: never;
112
+ });
113
+ /** A simulator cannot share a machine with itself: serial, unless `serial: false` states a server that gives every session an app of its own. A global setup holds the run's driver sessions, one per worker. */
114
+ export declare function mobile(options?: MobileProjectOptions): TestProjectInlineConfiguration;
115
+ //#endregion
116
+ //#region src/specifications/website/website.project.d.ts
117
+ /** `website()`: the assembled product, met through a served page. */
118
+ type WebsiteProjectOptions = RunnerOption & SpecificationProjectOptions;
119
+ export declare function website(options?: WebsiteProjectOptions): TestProjectInlineConfiguration;
186
120
  //#endregion
187
- //#region src/runner/projects.d.ts
188
- /** `unit()` — module tests, beside the modules they cover (CONVENTIONS I2). */
189
- type UnitProjectOptions = FacetProjectOptions & {
190
- /**
191
- * The trees module tests live in, when they do not live in `src/`. Each
192
- * root becomes `<root>/**\/*.test.ts`; `include` states the globs outright.
193
- */
121
+ //#region src/vitest/unit.project.d.ts
122
+ /** `unit()`: module tests, in the `__tests__/` of the folder of the modules they cover (rule `test-in-its-tests-folder`). */
123
+ type UnitProjectOptions = SpecificationProjectOptions & {
124
+ /** `false` shares one module graph per worker (`isolate: false`); for pure projects only. */
125
+ isolate?: boolean;
126
+ /** The trees module tests live in, each collected whole: none, every `.test.ts` outside `specs/`. */
194
127
  roots?: string[];
195
128
  };
196
- /**
197
- * A module test runs beside the module it covers: no DOM, no browser, no
198
- * pipeline. Its suffix is `.test.ts` and its place is OUTSIDE `specs/`, where
199
- * the assembled product is specified in `.spec.ts` — the two exclusions say
200
- * exactly that. `.test.tsx` is the third exclusion because a rendered thing is
201
- * a component test: a project's dependency scan reads every file its globs
202
- * match, and a `.tsx` collected here would be optimised for a page that never
203
- * opens.
204
- */
205
- declare function unit(options?: UnitProjectOptions): TestProjectInlineConfiguration;
129
+ /** `.test.tsx` is excluded: a rendered thing is a component test, and the dependency scan would optimise it for a page that never opens. */
130
+ export declare function unit(options?: UnitProjectOptions): TestProjectInlineConfiguration;
131
+ //#endregion
132
+ //#region src/index.vitest.d.ts
133
+ export declare const vitestConfig: (configUrl: string) => Promise<ViteUserConfig>;
206
134
  //#endregion
207
- export { type CliProjectOptions, type ComponentProjectOptions, type FacetProjectOptions, type LiterateOptions, type LiteratePlugin, type SpecConfig, type UnitProjectOptions, type WebsiteProjectOptions, api, cli, component, defineSpecConfig, integration, jobs, literate, mobile, unit, website };
135
+ export type { ApiProjectOptions, CliProjectOptions, ComponentProjectOptions, InProcessProjectOptions, IntegrationProjectOptions, JobProjectOptions, LintProjectOptions, LiterateDoor, LiterateOptions, LiteratePlugin, MobileProjectOptions, SpecificationProjectOptions, UnitProjectOptions, WebsiteProjectOptions };
136
+ //# sourceMappingURL=vitest.d.ts.map