@jterrazz/test 16.1.0 → 17.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 (304) hide show
  1. package/README.md +45 -171
  2. package/dist/browser/index.js +2 -2867
  3. package/dist/browser/services.js +2 -0
  4. package/dist/browser/stubs.js +2 -0
  5. package/dist/checker.d.ts +6 -1
  6. package/dist/checker.js +4551 -2612
  7. package/dist/config.d.ts +40 -0
  8. package/dist/config.js +309 -0
  9. package/dist/in-place.global-setup.d.ts +11 -0
  10. package/dist/in-place.global-setup.js +21 -0
  11. package/dist/index.d.ts +1653 -3002
  12. package/dist/index.js +5226 -3845
  13. package/dist/mobile-session.global-setup.d.ts +14 -0
  14. package/dist/mobile-session.global-setup.js +31 -0
  15. package/dist/oxlint.cjs +6073 -5616
  16. package/dist/oxlint.d.cts +43 -7212
  17. package/dist/oxlint.d.ts +43 -7212
  18. package/dist/oxlint.js +6065 -5609
  19. package/dist/route-coverage.global-setup.d.ts +42 -0
  20. package/dist/route-coverage.global-setup.js +2 -0
  21. package/dist/services.d.ts +3 -0
  22. package/dist/services.global-setup.d.ts +43 -0
  23. package/dist/services.global-setup.js +2 -0
  24. package/dist/services.js +597 -0
  25. package/dist/shared-appium.adapter.js +428 -0
  26. package/dist/shared-artifacts.js +32 -0
  27. package/dist/shared-chapter.js +7 -0
  28. package/dist/shared-container.port.d.ts +31 -0
  29. package/dist/shared-derived-projects.js +58 -0
  30. package/dist/shared-device.port.d.ts +189 -0
  31. package/dist/shared-exchange.js +447 -0
  32. package/dist/shared-in-place.js +172 -0
  33. package/dist/shared-index.browser.js +3191 -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-literate-plugin.js +183 -0
  40. package/dist/shared-manifest.js +1321 -0
  41. package/dist/shared-pause.js +11 -0
  42. package/dist/shared-peer.js +88 -0
  43. package/dist/shared-playwright.adapter.js +330 -0
  44. package/dist/shared-process.adapter.js +74 -0
  45. package/dist/shared-refusal.js +35 -0
  46. package/dist/shared-resolve.js +24 -0
  47. package/dist/shared-route-coverage.global-setup.js +187 -0
  48. package/dist/shared-scenario-failure.js +198 -0
  49. package/dist/shared-serve.js +365 -0
  50. package/dist/shared-service-images.js +10 -0
  51. package/dist/shared-services.global-setup.js +179 -0
  52. package/dist/shared-session-ledger.js +301 -0
  53. package/dist/shared-setup-entry.js +12 -0
  54. package/dist/shared-source-scan.js +133 -0
  55. package/dist/shared-spec-document.js +365 -0
  56. package/dist/shared-specifications.js +26 -0
  57. package/dist/shared-stream-body.js +130 -0
  58. package/dist/shared-stub-server.js +190 -0
  59. package/dist/shared-temp-root.global-setup.js +80 -0
  60. package/dist/shared-test-baseline.js +26 -0
  61. package/dist/shared-test-section.js +58 -0
  62. package/dist/shared-testcontainers.adapter.js +203 -0
  63. package/dist/shared-tokens.js +55 -0
  64. package/dist/shared-yaml-document.js +119 -0
  65. package/dist/stubs.d.ts +2 -0
  66. package/dist/stubs.js +657 -0
  67. package/dist/temp-root.global-setup.d.ts +7 -0
  68. package/dist/temp-root.global-setup.js +2 -0
  69. package/dist/vitest.d.ts +97 -163
  70. package/dist/vitest.js +374 -507
  71. package/docs/README.md +82 -36
  72. package/docs/concepts/architecture.md +118 -0
  73. package/docs/concepts/conventions.md +333 -0
  74. package/docs/guides/api-specs.md +374 -0
  75. package/docs/guides/cli-specs.md +564 -0
  76. package/docs/guides/component-specs.md +252 -0
  77. package/docs/guides/develop.md +94 -0
  78. package/docs/guides/integration-specs.md +181 -0
  79. package/docs/guides/job-specs.md +180 -0
  80. package/docs/guides/lint-specs.md +174 -0
  81. package/docs/guides/mobile-specs.md +319 -0
  82. package/docs/guides/module-tests.md +149 -0
  83. package/docs/guides/release.md +43 -0
  84. package/docs/guides/spec-documents.md +189 -0
  85. package/docs/guides/website-specs.md +413 -0
  86. package/docs/reference/assertions.md +345 -0
  87. package/docs/reference/glossary.md +20 -0
  88. package/docs/reference/linting.md +483 -0
  89. package/docs/reference/services.md +236 -0
  90. package/docs/reference/stubs.md +498 -0
  91. package/docs/reference/time-and-doubles.md +137 -0
  92. package/docs/reference/tokens.md +258 -0
  93. package/docs/reference/visitor.md +221 -0
  94. package/docs/start/getting-started.md +187 -0
  95. package/docs/start/set-up-a-project.md +214 -0
  96. package/package.json +50 -30
  97. package/schema/spec.schema.json +43 -17
  98. package/dist/appium.adapter.js +0 -489
  99. package/dist/artifacts.js +0 -32
  100. package/dist/fixtures.js +0 -110
  101. package/dist/literate.js +0 -1747
  102. package/dist/match.js +0 -804
  103. package/dist/playwright.adapter.js +0 -349
  104. package/dist/server.js +0 -160
  105. package/dist/stream.js +0 -321
  106. package/dist/substring-warning.js +0 -244
  107. package/docs/01-architecture.md +0 -95
  108. package/docs/02-developing.md +0 -351
  109. package/docs/03-testing.md +0 -495
  110. package/docs/04-operating.md +0 -101
  111. package/docs/05-module-tests.md +0 -152
  112. package/docs/06-integration.md +0 -180
  113. package/docs/07-component.md +0 -246
  114. package/docs/08-website.md +0 -404
  115. package/docs/09-mobile.md +0 -270
  116. package/docs/10-api.md +0 -264
  117. package/docs/11-jobs.md +0 -157
  118. package/docs/12-cli.md +0 -677
  119. package/docs/13-elements.md +0 -242
  120. package/docs/14-assertions.md +0 -314
  121. package/docs/15-tokens.md +0 -253
  122. package/docs/16-contracts.md +0 -438
  123. package/docs/17-services.md +0 -188
  124. package/docs/18-conventions.md +0 -305
  125. package/docs/19-linting.md +0 -510
  126. package/docs/decisions/001-v9-conventions-on-three-channels.md +0 -50
  127. package/docs/decisions/002-the-statique-channel-holds-only-what-upstream-does-not.md +0 -49
  128. package/docs/decisions/003-a-rendered-component-is-a-facet-on-vitest-browser-mode.md +0 -84
  129. package/docs/decisions/004-a-module-against-real-services-or-a-golden-is-the-integration-facet.md +0 -81
  130. package/docs/decisions/005-the-doubles-ladder-is-closed.md +0 -86
  131. package/docs/decisions/006-the-catalogue-reaches-a-file-by-its-role.md +0 -245
  132. package/docs/decisions/007-compose-mode-leaves-the-package.md +0 -53
  133. package/docs/decisions/008-vitest-5-node-24-and-the-native-seams-as-optional-peers.md +0 -75
  134. package/docs/decisions/_template.md +0 -22
  135. package/docs/reference/classes/Matcher.md +0 -120
  136. package/docs/reference/classes/ProcessHandle.md +0 -368
  137. package/docs/reference/functions/defineContract.md +0 -39
  138. package/docs/reference/functions/defineContracts.md +0 -36
  139. package/docs/reference/functions/disabled.md +0 -28
  140. package/docs/reference/functions/enabled.md +0 -20
  141. package/docs/reference/functions/focused.md +0 -26
  142. package/docs/reference/functions/mockOf.md +0 -79
  143. package/docs/reference/functions/postgres.md +0 -31
  144. package/docs/reference/functions/process.md +0 -33
  145. package/docs/reference/functions/redis.md +0 -28
  146. package/docs/reference/functions/required.md +0 -41
  147. package/docs/reference/functions/selected.md +0 -26
  148. package/docs/reference/functions/sqlite.md +0 -33
  149. package/docs/reference/functions/testId.md +0 -20
  150. package/docs/reference/functions/text.md +0 -40
  151. package/docs/reference/functions/valued.md +0 -28
  152. package/docs/reference/functions/waitUntil.md +0 -46
  153. package/docs/reference/functions/within.md +0 -29
  154. package/docs/reference/index.md +0 -196
  155. package/docs/reference/interfaces/BaseResult.md +0 -87
  156. package/docs/reference/interfaces/CallResult.md +0 -160
  157. package/docs/reference/interfaces/CaptureScope.md +0 -82
  158. package/docs/reference/interfaces/CliResult.md +0 -253
  159. package/docs/reference/interfaces/ContainerAccessor.md +0 -166
  160. package/docs/reference/interfaces/DirectoryAccessor.md +0 -33
  161. package/docs/reference/interfaces/FetchResult.md +0 -180
  162. package/docs/reference/interfaces/FilesystemAccessor.md +0 -46
  163. package/docs/reference/interfaces/HttpResult.md +0 -126
  164. package/docs/reference/interfaces/JsonAccessor.md +0 -46
  165. package/docs/reference/interfaces/PageResult.md +0 -356
  166. package/docs/reference/interfaces/RenderResult.md +0 -72
  167. package/docs/reference/interfaces/RenderedText.md +0 -110
  168. package/docs/reference/interfaces/ResponseAccessor.md +0 -47
  169. package/docs/reference/interfaces/ScreenResult.md +0 -128
  170. package/docs/reference/interfaces/TableAccessor.md +0 -26
  171. package/docs/reference/interfaces/TextAccessor.md +0 -96
  172. package/docs/reference/type-aliases/ApiHandle.md +0 -68
  173. package/docs/reference/type-aliases/ApiSpecification.md +0 -213
  174. package/docs/reference/type-aliases/ApiSpecificationOptions.md +0 -68
  175. package/docs/reference/type-aliases/BrowserConsoleMessage.md +0 -30
  176. package/docs/reference/type-aliases/BrowserLinkElement.md +0 -50
  177. package/docs/reference/type-aliases/BrowserMetaElement.md +0 -40
  178. package/docs/reference/type-aliases/BrowserOpenOptions.md +0 -87
  179. package/docs/reference/type-aliases/BrowserPage.md +0 -132
  180. package/docs/reference/type-aliases/BrowserPort.md +0 -51
  181. package/docs/reference/type-aliases/CliEnv.md +0 -11
  182. package/docs/reference/type-aliases/CliHandle.md +0 -80
  183. package/docs/reference/type-aliases/CliInput.md +0 -36
  184. package/docs/reference/type-aliases/CliOutput.md +0 -46
  185. package/docs/reference/type-aliases/CliPort.md +0 -58
  186. package/docs/reference/type-aliases/CliSpecification.md +0 -144
  187. package/docs/reference/type-aliases/CliSpecificationOptions.md +0 -134
  188. package/docs/reference/type-aliases/ComponentChain.md +0 -156
  189. package/docs/reference/type-aliases/ComponentScenario.md +0 -20
  190. package/docs/reference/type-aliases/ComponentUi.md +0 -47
  191. package/docs/reference/type-aliases/ComponentVisitor.md +0 -10
  192. package/docs/reference/type-aliases/ContainerPort.md +0 -113
  193. package/docs/reference/type-aliases/Contract.md +0 -68
  194. package/docs/reference/type-aliases/ContractInput.md +0 -13
  195. package/docs/reference/type-aliases/ContractRequest.md +0 -95
  196. package/docs/reference/type-aliases/ContractResponder.md +0 -23
  197. package/docs/reference/type-aliases/ContractResponse.md +0 -78
  198. package/docs/reference/type-aliases/ContractResponseValue.md +0 -13
  199. package/docs/reference/type-aliases/Contracts.md +0 -48
  200. package/docs/reference/type-aliases/DatabaseKeys.md +0 -16
  201. package/docs/reference/type-aliases/DatabasePort.md +0 -72
  202. package/docs/reference/type-aliases/DeviceOpenOptions.md +0 -46
  203. package/docs/reference/type-aliases/DevicePort.md +0 -51
  204. package/docs/reference/type-aliases/DeviceScreen.md +0 -32
  205. package/docs/reference/type-aliases/DeviceTimeouts.md +0 -39
  206. package/docs/reference/type-aliases/DockerSpecConfig.md +0 -43
  207. package/docs/reference/type-aliases/DomMount.md +0 -21
  208. package/docs/reference/type-aliases/ElementKind.md +0 -27
  209. package/docs/reference/type-aliases/ElementMatch.md +0 -74
  210. package/docs/reference/type-aliases/ElementOptions.md +0 -29
  211. package/docs/reference/type-aliases/ElementRef.md +0 -128
  212. package/docs/reference/type-aliases/ExecOptions.md +0 -37
  213. package/docs/reference/type-aliases/FileAccessor.md +0 -54
  214. package/docs/reference/type-aliases/HonoApp.md +0 -31
  215. package/docs/reference/type-aliases/HttpContractFilter.md +0 -49
  216. package/docs/reference/type-aliases/HttpResponseInit.md +0 -46
  217. package/docs/reference/type-aliases/HttpStreamInit.md +0 -58
  218. package/docs/reference/type-aliases/IntegrationHandle.md +0 -46
  219. package/docs/reference/type-aliases/IntegrationSpecification.md +0 -111
  220. package/docs/reference/type-aliases/IntegrationSpecificationOptions.md +0 -42
  221. package/docs/reference/type-aliases/Intercept.md +0 -19
  222. package/docs/reference/type-aliases/InterceptOptions.md +0 -28
  223. package/docs/reference/type-aliases/InterceptScope.md +0 -11
  224. package/docs/reference/type-aliases/IsolationStrategy.md +0 -75
  225. package/docs/reference/type-aliases/JobHandle.md +0 -34
  226. package/docs/reference/type-aliases/JobsHandle.md +0 -57
  227. package/docs/reference/type-aliases/JobsResult.md +0 -16
  228. package/docs/reference/type-aliases/JobsSpecification.md +0 -94
  229. package/docs/reference/type-aliases/JobsSpecificationOptions.md +0 -56
  230. package/docs/reference/type-aliases/LandmarkKind.md +0 -20
  231. package/docs/reference/type-aliases/LiterateRunFlags.md +0 -27
  232. package/docs/reference/type-aliases/LiterateServeRegistration.md +0 -70
  233. package/docs/reference/type-aliases/MatchFixtureOptions.md +0 -27
  234. package/docs/reference/type-aliases/MatchableRequest.md +0 -61
  235. package/docs/reference/type-aliases/MatcherKind.md +0 -34
  236. package/docs/reference/type-aliases/MobileBackendOptions.md +0 -28
  237. package/docs/reference/type-aliases/MobileElementKind.md +0 -14
  238. package/docs/reference/type-aliases/MobileElementMatch.md +0 -60
  239. package/docs/reference/type-aliases/MobileElementRef.md +0 -20
  240. package/docs/reference/type-aliases/MobileHandle.md +0 -65
  241. package/docs/reference/type-aliases/MobileScenario.md +0 -20
  242. package/docs/reference/type-aliases/MobileSpecification.md +0 -51
  243. package/docs/reference/type-aliases/MobileSpecificationOptions.md +0 -126
  244. package/docs/reference/type-aliases/MobileVisitor.md +0 -81
  245. package/docs/reference/type-aliases/MockOfOptions.md +0 -26
  246. package/docs/reference/type-aliases/MockPort.md +0 -10
  247. package/docs/reference/type-aliases/PinnedClock.md +0 -10
  248. package/docs/reference/type-aliases/PostgresOptions.md +0 -32
  249. package/docs/reference/type-aliases/ProcessOptions.md +0 -112
  250. package/docs/reference/type-aliases/RedisOptions.md +0 -20
  251. package/docs/reference/type-aliases/RenderSubject.md +0 -12
  252. package/docs/reference/type-aliases/ScreenNode.md +0 -67
  253. package/docs/reference/type-aliases/ServerPort.md +0 -36
  254. package/docs/reference/type-aliases/ServerResponse.md +0 -46
  255. package/docs/reference/type-aliases/ServerSpec.md +0 -21
  256. package/docs/reference/type-aliases/ServiceHandle.md +0 -216
  257. package/docs/reference/type-aliases/ServiceRecord.md +0 -12
  258. package/docs/reference/type-aliases/SpecDocument.md +0 -84
  259. package/docs/reference/type-aliases/SpecEnvToken.md +0 -21
  260. package/docs/reference/type-aliases/SpecFileAssertion.md +0 -27
  261. package/docs/reference/type-aliases/SpecFixture.md +0 -30
  262. package/docs/reference/type-aliases/SpecKind.md +0 -8
  263. package/docs/reference/type-aliases/SpecRun.md +0 -108
  264. package/docs/reference/type-aliases/SpecServeEntry.md +0 -40
  265. package/docs/reference/type-aliases/SpecStream.md +0 -32
  266. package/docs/reference/type-aliases/SpecificationConfig.md +0 -290
  267. package/docs/reference/type-aliases/SqliteOptions.md +0 -36
  268. package/docs/reference/type-aliases/SseEvent.md +0 -58
  269. package/docs/reference/type-aliases/StreamBody.md +0 -61
  270. package/docs/reference/type-aliases/TextFilter.md +0 -22
  271. package/docs/reference/type-aliases/VisitScenario.md +0 -20
  272. package/docs/reference/type-aliases/Visitor.md +0 -215
  273. package/docs/reference/type-aliases/WaitUntilOptions.md +0 -46
  274. package/docs/reference/type-aliases/WebsiteBackendOptions.md +0 -37
  275. package/docs/reference/type-aliases/WebsiteHandle.md +0 -51
  276. package/docs/reference/type-aliases/WebsiteSpecification.md +0 -118
  277. package/docs/reference/type-aliases/WebsiteSpecificationOptions.md +0 -40
  278. package/docs/reference/variables/anthropic.md +0 -19
  279. package/docs/reference/variables/banner.md +0 -10
  280. package/docs/reference/variables/button.md +0 -10
  281. package/docs/reference/variables/clock.md +0 -16
  282. package/docs/reference/variables/complementary.md +0 -10
  283. package/docs/reference/variables/component.md +0 -10
  284. package/docs/reference/variables/content.md +0 -10
  285. package/docs/reference/variables/contentinfo.md +0 -10
  286. package/docs/reference/variables/dialog.md +0 -10
  287. package/docs/reference/variables/field.md +0 -10
  288. package/docs/reference/variables/form.md +0 -10
  289. package/docs/reference/variables/heading.md +0 -10
  290. package/docs/reference/variables/http.md +0 -40
  291. package/docs/reference/variables/intercept.md +0 -11
  292. package/docs/reference/variables/link.md +0 -10
  293. package/docs/reference/variables/listitem.md +0 -10
  294. package/docs/reference/variables/main.md +0 -10
  295. package/docs/reference/variables/match.md +0 -8
  296. package/docs/reference/variables/navigation.md +0 -10
  297. package/docs/reference/variables/openai.md +0 -21
  298. package/docs/reference/variables/option.md +0 -17
  299. package/docs/reference/variables/region.md +0 -10
  300. package/docs/reference/variables/row.md +0 -10
  301. package/docs/reference/variables/search.md +0 -10
  302. package/docs/reference/variables/specification.md +0 -8
  303. package/docs/reference/variables/status.md +0 -10
  304. package/docs/reference/variables/table.md +0 -10
@@ -1,196 +0,0 @@
1
- <!-- GENERATED by `typescript docs` — DO NOT EDIT -->
2
- # @jterrazz/test
3
-
4
- ## Classes
5
-
6
- | Class | Description |
7
- | ------ | ------ |
8
- | [Matcher](classes/Matcher.md) | A dynamic-value matcher. Created via the [match](variables/match.md) factories — never constructed directly by user code. |
9
- | [ProcessHandle](classes/ProcessHandle.md) | An external process, declared like any other service. |
10
-
11
- ## Interfaces
12
-
13
- | Interface | Description |
14
- | ------ | ------ |
15
- | [BaseResult](interfaces/BaseResult.md) | Base result - common accessors available after any action type. Extended by HttpResult, CliResult, and used directly by job results. |
16
- | [CallResult](interfaces/CallResult.md) | The result of an in-process call — the integration facet's whole surface. |
17
- | [CaptureScope](interfaces/CaptureScope.md) | Named captures recorded by `match.ref()` / `{{type#ref}}` placeholders. One scope lives on each spec result — every assertion chained off the same result shares it, and a new chain starts fresh. |
18
- | [CliResult](interfaces/CliResult.md) | Result from a command action (`.exec()`). |
19
- | [ContainerAccessor](interfaces/ContainerAccessor.md) | Assertion accessor for a single Docker container captured by the docker() spec mode. Mirrors the shape of [CliResult](interfaces/CliResult.md) so tests use the same vocabulary (`stdout.toContain`, `file(...).content`, etc.) regardless of where output came from. |
20
- | [DirectoryAccessor](interfaces/DirectoryAccessor.md) | Read-only accessor for a directory produced by a spec action. |
21
- | [FetchResult](interfaces/FetchResult.md) | Result from a raw `.fetch()` action (robots.txt, sitemaps, redirects). |
22
- | [FilesystemAccessor](interfaces/FilesystemAccessor.md) | Read-only accessor for the whole temporary working directory used by a command spec. |
23
- | [HttpResult](interfaces/HttpResult.md) | Result from an HTTP action (.request(), .get(), .post(), .put(), .delete()). |
24
- | [JsonAccessor](interfaces/JsonAccessor.md) | Read-only accessor for a JSON payload parsed from a text stream (stdout). |
25
- | [PageResult](interfaces/PageResult.md) | Result from a rendered `.visit()` action — the page as a browser saw it. |
26
- | [RenderedText](interfaces/RenderedText.md) | A stream captured INSIDE the page. |
27
- | [RenderResult](interfaces/RenderResult.md) | What a render resolves to — the component as the page saw it, after the scenario ran. |
28
- | [ResponseAccessor](interfaces/ResponseAccessor.md) | Read-only accessor for an HTTP response. |
29
- | [ScreenResult](interfaces/ScreenResult.md) | Result from a `.open()` action — the screen as the device saw it, final state. |
30
- | [TableAccessor](interfaces/TableAccessor.md) | Read-only accessor for a database table after a specification run. |
31
- | [TextAccessor](interfaces/TextAccessor.md) | Read-only accessor for a captured text handle — THE universal one: stdout, stderr, container logs, and file text all surface as a `TextAccessor`. |
32
-
33
- ## Type Aliases
34
-
35
- | Type Alias | Description |
36
- | ------ | ------ |
37
- | [ApiHandle](type-aliases/ApiHandle.md) | The record returned by startApi \| specification.api. Destructure with the canonical names (CONVENTIONS A3): |
38
- | [ApiSpecification](type-aliases/ApiSpecification.md) | The `api` facet — HTTP chain entry handed out by `specification.api()`. Setup methods chain; action methods are terminal: they execute the spec and resolve to the result. |
39
- | [ApiSpecificationOptions](type-aliases/ApiSpecificationOptions.md) | Options for startApi \| specification.api. |
40
- | [BrowserConsoleMessage](type-aliases/BrowserConsoleMessage.md) | A console message emitted while the page loaded or the scenario ran. |
41
- | [BrowserLinkElement](type-aliases/BrowserLinkElement.md) | A `<link>` element captured from the rendered document's head. |
42
- | [BrowserMetaElement](type-aliases/BrowserMetaElement.md) | A `<meta>` element captured from the rendered document's head. |
43
- | [BrowserOpenOptions](type-aliases/BrowserOpenOptions.md) | Per-visit options forwarded to the browser context. |
44
- | [BrowserPage](type-aliases/BrowserPage.md) | The rendered page captured by a browser visit — the FINAL state when a scenario ran. Extraction happens in-page (the browser IS the HTML parser); interpretation of the raw elements belongs to the model. |
45
- | [BrowserPort](type-aliases/BrowserPort.md) | Abstract browser interface for the website specification runner. One implementation lives in `integrations/playwright/` — a single shared browser instance per runner; each `open()` gets a fresh, isolated context. |
46
- | [CliEnv](type-aliases/CliEnv.md) | Extra environment variables to set for the child process. Values are merged on top of process.env. A `null` value unsets the variable. |
47
- | [CliHandle](type-aliases/CliHandle.md) | The record returned by startCli \| specification.cli. Destructure with the canonical names (CONVENTIONS A3): |
48
- | [CliInput](type-aliases/CliInput.md) | What one invocation is handed beyond its arguments — the two per-run inputs a spec document may state. Both are absent by default: the child gets an immediately-closed stdin (never a TTY) and the adapter's own timeout. |
49
- | [CliOutput](type-aliases/CliOutput.md) | Raw output from a command execution, including exit code and captured output streams. |
50
- | [CliPort](type-aliases/CliPort.md) | - |
51
- | [CliSpecification](type-aliases/CliSpecification.md) | The `cli` facet — command chain entry handed out by `specification.cli()`. Setup methods chain; `.exec()` is the single terminal action (CONVENTIONS B2) — `{ waitFor?, timeout? }` covers long-running processes. |
52
- | [CliSpecificationOptions](type-aliases/CliSpecificationOptions.md) | Options for startCli \| specification.cli. |
53
- | [ComponentChain](type-aliases/ComponentChain.md) | The chain. Every setup returns a new one, so the handle a spec imports never carries the previous test's contracts, wrapper or clock. |
54
- | [ComponentScenario](type-aliases/ComponentScenario.md) | The behaviour of a render; assertions stay in the Then, on the result (W1). |
55
- | [ComponentUi](type-aliases/ComponentUi.md) | Represents all of the things React can render. |
56
- | [ComponentVisitor](type-aliases/ComponentVisitor.md) | The interaction vocabulary a render scenario is handed — the When. |
57
- | [ContainerPort](type-aliases/ContainerPort.md) | Abstract container interface. Represents a running service (database, cache, etc.) |
58
- | [Contract](type-aliases/Contract.md) | A declared external interaction: what to match (`request`) and what to reply (`response`), together in one named artifact. Contracts live in TypeScript files under `contracts/` next to the tests that use them, so the business payload (prompts, JSON responses) is visible at a glance while the real HTTP call stays mocked underneath. |
59
- | [ContractInput](type-aliases/ContractInput.md) | Any accepted contract input: one, a list, or a composite. |
60
- | [ContractRequest](type-aliases/ContractRequest.md) | The request half of a contract: which outgoing call it speaks for. |
61
- | [ContractResponder](type-aliases/ContractResponder.md) | A dynamic response: computed from the observed request at the moment the contract is served, rather than fixed ahead of time. Handed the same [MatchableRequest](type-aliases/MatchableRequest.md) the request half matched on, so the reply can echo or derive from the body/headers/url. |
62
- | [ContractResponse](type-aliases/ContractResponse.md) | The response half of a contract: what to reply when the request matches. |
63
- | [ContractResponseValue](type-aliases/ContractResponseValue.md) | What a contract replies with: either a fixed [ContractResponse](type-aliases/ContractResponse.md) or a [ContractResponder](type-aliases/ContractResponder.md) evaluated per served request. |
64
- | [Contracts](type-aliases/Contracts.md) | A composite of contracts — the unit tests import. Flat, ordered, immutable; `.with()` derives a variant without touching the original. |
65
- | [DatabaseKeys](type-aliases/DatabaseKeys.md) | Keys of a services record whose handles are databases. |
66
- | [DatabasePort](type-aliases/DatabasePort.md) | Abstract database interface for specification runners. Implement this to plug in your database stack (e.g. Postgres, SQLite). |
67
- | [DeviceOpenOptions](type-aliases/DeviceOpenOptions.md) | Per-open options forwarded to the device session. |
68
- | [DevicePort](type-aliases/DevicePort.md) | Abstract device interface for the mobile specification runner. One implementation lives in `integrations/appium/` — a single driver session per runner, created on the first `open()` and reused; each open terminates and relaunches the app for a deterministic fresh state. |
69
- | [DeviceScreen](type-aliases/DeviceScreen.md) | The screen captured by a device open — the FINAL state when a scenario ran. The tree is the projected page source; `texts` are the visible labels/values in document order, consecutive duplicates collapsed. |
70
- | [DeviceTimeouts](type-aliases/DeviceTimeouts.md) | How long a device session waits, in milliseconds. Every field is optional and falls back to the framework's own default, so a runner states only the wait it needs to move — the defaults suit a release build, and a project that drives a DEV build pays for its bundler's cold boot. |
71
- | [DockerSpecConfig](type-aliases/DockerSpecConfig.md) | Configuration for the docker-aware cli mode. When set on [SpecificationConfig](type-aliases/SpecificationConfig.md), the cli runner generates a test-run id, injects it into the child env under `envVar`, then queries Docker for every container carrying `testRunLabel=<id>` after the command exits. |
72
- | [DomMount](type-aliases/DomMount.md) | A vanilla DOM subject: a function handed the container it must fill. Its optional return is the teardown, the way a DOM library states one. |
73
- | [ElementKind](type-aliases/ElementKind.md) | The interactive/textual element kinds — what a visitor actually acts on. |
74
- | [ElementMatch](type-aliases/ElementMatch.md) | One candidate captured when a descriptor matched more than one element — the evidence the ambiguity error enumerates so the author can disambiguate without opening a browser. |
75
- | [ElementOptions](type-aliases/ElementOptions.md) | Options accepted by every named descriptor. |
76
- | [ElementRef](type-aliases/ElementRef.md) | A user-facing element descriptor — pure data, built by the element vocabulary (`button()`, `link()`, `field()`, …) and translated into concrete locators by the browser integration. CSS/XPath selectors are deliberately not expressible: user-facing elements are the only surface. |
77
- | [ExecOptions](type-aliases/ExecOptions.md) | Options for the long-running form of `.exec()` (CONVENTIONS B2). When either option is present the process is spawned and observed: it resolves as soon as `waitFor` appears in stdout/stderr, and is killed when `timeout` elapses (exit code 124). |
78
- | [FileAccessor](type-aliases/FileAccessor.md) | Read-only handle to a single file produced by a spec action. |
79
- | [HonoApp](type-aliases/HonoApp.md) | Any object with a request method compatible with Hono's app.request(). |
80
- | [HttpContractFilter](type-aliases/HttpContractFilter.md) | Request filters for the generic HTTP provider. Every field is a subset constraint — a request matches when all provided fields match. |
81
- | [HttpResponseInit](type-aliases/HttpResponseInit.md) | Init options shared by the response builders. |
82
- | [HttpStreamInit](type-aliases/HttpStreamInit.md) | Init options for a streamed reply. |
83
- | [IntegrationHandle](type-aliases/IntegrationHandle.md) | The record returned by startIntegration \| specification.integration. Destructure with the canonical names (CONVENTIONS A3): |
84
- | [IntegrationSpecification](type-aliases/IntegrationSpecification.md) | The `integration` facet — the in-process chain handed out by `specification.integration()`. |
85
- | [IntegrationSpecificationOptions](type-aliases/IntegrationSpecificationOptions.md) | Options for startIntegration \| specification.integration. |
86
- | [Intercept](type-aliases/Intercept.md) | The module-scope network double. Resolves once the engine is listening — which is why it is a promise, and why the canonical form awaits it: |
87
- | [InterceptOptions](type-aliases/InterceptOptions.md) | What a scope may state about the network it declares. |
88
- | [InterceptScope](type-aliases/InterceptScope.md) | One block's worth of declared network. Disposed at the end of the scope that declared it: the handlers are dropped, and an unmatched request is thrown. |
89
- | [IsolationStrategy](type-aliases/IsolationStrategy.md) | Strategy for isolating service state across parallel test workers. |
90
- | [JobHandle](type-aliases/JobHandle.md) | A named job that can be triggered via jobs.trigger(). |
91
- | [JobsHandle](type-aliases/JobsHandle.md) | The record returned by startJobs \| specification.jobs. Destructure with the canonical names (CONVENTIONS A3): |
92
- | [JobsResult](type-aliases/JobsResult.md) | What a triggered job HANDS BACK. |
93
- | [JobsSpecification](type-aliases/JobsSpecification.md) | - |
94
- | [JobsSpecificationOptions](type-aliases/JobsSpecificationOptions.md) | Options for startJobs \| specification.jobs. |
95
- | [LandmarkKind](type-aliases/LandmarkKind.md) | The landmark roles — the standard set of page regions, and the only containers a scope can name. Closed on purpose: ARIA defines exactly these, so `within()` never becomes a second selector language. |
96
- | [LiterateRunFlags](type-aliases/LiterateRunFlags.md) | Per-call options for runSpecDocument / `cli.run()`. |
97
- | [LiterateServeRegistration](type-aliases/LiterateServeRegistration.md) | A server a document may start by name (`serve: mcp`), registered once per app in the `serve` option of `specification.cli()`. |
98
- | [MatchableRequest](type-aliases/MatchableRequest.md) | The observed outgoing request, reduced to what contract matchers inspect. Built once per request by the engine (MSW on api/jobs, the stub backend on website/mobile) and handed to [ContractRequest.match](type-aliases/ContractRequest.md#match) and to a [ContractResponder](type-aliases/ContractResponder.md). |
99
- | [MatcherKind](type-aliases/MatcherKind.md) | The frozen token vocabulary (CONVENTIONS D4) plus the code-only kinds. |
100
- | [MatchFixtureOptions](type-aliases/MatchFixtureOptions.md) | Per-call options for the fixture-file `toMatch` subjects. `frozen` opts a single fixture OUT of update-mode rewriting: a frozen fixture is NEVER written under `TEST_UPDATE=1` (or vitest `-u`) — in update mode a frozen mismatch still throws its diff, and a frozen missing fixture still throws its "does not exist" error. This is what makes a DELIBERATELY-WRONG fixture (the subject of a negative test that asserts the mismatch/error rendering) survivable across update runs instead of being silently overwritten with the actual output. |
101
- | [MobileBackendOptions](type-aliases/MobileBackendOptions.md) | The declared stub backend behind the app under test. The framework owns the simulator and appium but NOT the JS bundler (Metro belongs to the caller's repo, like `next build` belongs to a website's) — so nothing is injected: the handle exposes `backendUrl` and the CALLER wires it into its own bundler env. |
102
- | [MobileElementKind](type-aliases/MobileElementKind.md) | The element kinds a mobile screen can designate — the structural subset of [ElementRef](type-aliases/ElementRef.md) kinds that map onto the XCUITest accessibility tree. There is ONE element vocabulary across facets: `button('Bookmark')` works in a visit scenario and a mobile scenario alike. Landmarks have no iOS analog — passing one to a mobile verb refuses at runtime. |
103
- | [MobileElementMatch](type-aliases/MobileElementMatch.md) | One candidate captured when a descriptor matched more than one element — the evidence the ambiguity error enumerates so the author can disambiguate without opening the simulator. |
104
- | [MobileElementRef](type-aliases/MobileElementRef.md) | A user-facing element descriptor for mobile scenarios — pure data, built by the shared element vocabulary (`button()`, `field()`, `content()`, `testId()`, `within()`) and translated into iOS predicate strings by the device integration. Structurally the same ref type as the browser's, so the vocabulary stays single; kinds outside [MobileElementKind](type-aliases/MobileElementKind.md) (the ARIA landmarks) are refused at runtime with a message naming the boundary. |
105
- | [MobileHandle](type-aliases/MobileHandle.md) | The record returned by startMobile \| specification.mobile. Destructure with the canonical names (CONVENTIONS A3): |
106
- | [MobileScenario](type-aliases/MobileScenario.md) | The behavior of an open — the When of the spec; assertions stay in the Then. |
107
- | [MobileSpecification](type-aliases/MobileSpecification.md) | The `mobile` facet — screen chain entry handed out by `specification.mobile()`. `.open()` is the single, terminal action: it terminates and relaunches the app (deterministic fresh state), applies the deep link, runs the scenario, and captures the final screen. |
108
- | [MobileSpecificationOptions](type-aliases/MobileSpecificationOptions.md) | Options for startMobile \| specification.mobile. |
109
- | [MobileVisitor](type-aliases/MobileVisitor.md) | The visitor — the interaction vocabulary handed to a mobile scenario. Every verb auto-waits by polling until a visible match exists; acting verbs then enforce exactly-one (W3), while `see()` — the single synchronization primitive — is satisfied by any visible match. There is no sleep and no conditional helper. |
110
- | [MockOfOptions](type-aliases/MockOfOptions.md) | How much of the port the double answers for. |
111
- | [MockPort](type-aliases/MockPort.md) | The factory's own shape — kept as a name so a consumer can annotate with it. |
112
- | [PinnedClock](type-aliases/PinnedClock.md) | A pinned clock — released when the `using` scope that declared it ends. |
113
- | [PostgresOptions](type-aliases/PostgresOptions.md) | - |
114
- | [ProcessOptions](type-aliases/ProcessOptions.md) | The ONE shape an external process takes — the site under test, a backend a page talks to, a bundler a simulator loads from. Built by `process()` (chapter 17) and accepted wherever a facet starts something outside this process: `website({ server })`, `services: { api: process(…) }`, and the literate `serve:` registry. |
115
- | [RedisOptions](type-aliases/RedisOptions.md) | - |
116
- | [RenderSubject](type-aliases/RenderSubject.md) | What `.render()` mounts. A React tree is an element (`<PostTable />`); a vanilla DOM subject is the FUNCTION that fills a container, which is how a DOM-only module is called in production too. |
117
- | [ScreenNode](type-aliases/ScreenNode.md) | One node of the projected accessibility tree — the XCUITest page source with its noise collapsed: unlabeled, identifier-less, valueless wrapper nodes are dropped and their children hoisted, so the projection stays stable and golden-friendly. Type names lose the `XCUIElementType` prefix. |
118
- | [ServerPort](type-aliases/ServerPort.md) | Abstract server interface for specification runners. Integration mode uses an in-process Hono app; E2E mode uses real HTTP via fetch. |
119
- | [ServerResponse](type-aliases/ServerResponse.md) | HTTP response returned by a server port, with parsed JSON body. |
120
- | [ServerSpec](type-aliases/ServerSpec.md) | What `server` may be handed as, and what it resolves to. |
121
- | [ServiceHandle](type-aliases/ServiceHandle.md) | A service handle — returned by factory functions like postgres(), redis(). Mutable: connectionString is populated after the orchestrator starts containers. |
122
- | [ServiceRecord](type-aliases/ServiceRecord.md) | Infrastructure services declared as a named record. Keys become the typed vocabulary of the whole spec: the server factory receives the same record, and `.seed()` / `.table()` target databases by key. |
123
- | [SpecDocument](type-aliases/SpecDocument.md) | A parsed `<case>.spec.yaml`. |
124
- | [SpecEnvToken](type-aliases/SpecEnvToken.md) | One `env:` entry — a bare word naming a registered set, or a `KEY=value` pair. |
125
- | [SpecFileAssertion](type-aliases/SpecFileAssertion.md) | One `files:` assertion, keyed by a workdir-relative path. |
126
- | [SpecFixture](type-aliases/SpecFixture.md) | One `fixture:` entry — a path with the line it was declared on. |
127
- | [SpecificationConfig](type-aliases/SpecificationConfig.md) | Adapter configuration passed to the specification facets at setup time. |
128
- | [SpecKind](type-aliases/SpecKind.md) | - |
129
- | [SpecRun](type-aliases/SpecRun.md) | One run: a command, what it must exit with, and what it must have produced. |
130
- | [SpecServeEntry](type-aliases/SpecServeEntry.md) | One `serve:` entry — a registered server plus the extra env it is started with. |
131
- | [SpecStream](type-aliases/SpecStream.md) | An expected stream: its text, and the first line of that text in the file. |
132
- | [SqliteOptions](type-aliases/SqliteOptions.md) | - |
133
- | [SseEvent](type-aliases/SseEvent.md) | One server-sent event, as `http.sse()` frames it. |
134
- | [StreamBody](type-aliases/StreamBody.md) | A body that arrives in pieces — what `http.stream()` and `http.sse()` build. |
135
- | [TextFilter](type-aliases/TextFilter.md) | A text filter on a provider request builder (`openai.chat({ user })`, `anthropic.messages({ system })`, …). |
136
- | [Visitor](type-aliases/Visitor.md) | The visitor — the interaction vocabulary handed to a visit scenario. Every action auto-waits (playwright actionability); `see()` is the single synchronization primitive: it retries until the element is visible and fails at the timeout. There is no sleep and no conditional helper. |
137
- | [VisitScenario](type-aliases/VisitScenario.md) | The behavior of a visit — the When of the spec; assertions stay in the Then. |
138
- | [WaitUntilOptions](type-aliases/WaitUntilOptions.md) | How long to wait, and how often to look. |
139
- | [WebsiteBackendOptions](type-aliases/WebsiteBackendOptions.md) | The declared stub backend behind the site under test — started before the server command, torn down with the runner. Its URL is injected into the server child's environment under `env`; the contracts each chain declares via `.intercept(...)` are what it serves. |
140
- | [WebsiteHandle](type-aliases/WebsiteHandle.md) | The record returned by startWebsite \| specification.website. Destructure with the canonical names (CONVENTIONS A3): |
141
- | [WebsiteSpecification](type-aliases/WebsiteSpecification.md) | The `website` facet — page chain entry handed out by `specification.website()`. Setup methods chain; action methods are terminal. `.visit()` renders the page in the shared browser; `.fetch()` performs one raw HTTP exchange and never follows redirects. |
142
- | [WebsiteSpecificationOptions](type-aliases/WebsiteSpecificationOptions.md) | Options for startWebsite \| specification.website. `server` (start the site locally) and `url` (target a running site) are mutually exclusive BY TYPE — the union makes the invalid combinations inexpressible rather than runtime-checked. `backend` requires `server` mode for the same reason: a deployed site cannot be pointed at a local stub. |
143
-
144
- ## Variables
145
-
146
- | Variable | Description |
147
- | ------ | ------ |
148
- | [anthropic](variables/anthropic.md) | Anthropic API intercept helpers. |
149
- | [banner](variables/banner.md) | The `banner` landmark — the page header. |
150
- | [button](variables/button.md) | A button (or element with the button role), by accessible name. |
151
- | [clock](variables/clock.md) | - |
152
- | [complementary](variables/complementary.md) | The `complementary` landmark — an `<aside>`, a sidebar. |
153
- | [component](variables/component.md) | Present, typed, and refusing — every setup and the terminal action alike. |
154
- | [content](variables/content.md) | An element containing the given text. |
155
- | [contentinfo](variables/contentinfo.md) | The `contentinfo` landmark — the page footer. |
156
- | [dialog](variables/dialog.md) | A modal or non-modal `<dialog>`, by accessible name. A closed one is absent. |
157
- | [field](variables/field.md) | A form field, by label. |
158
- | [form](variables/form.md) | The `form` landmark — a form carrying an accessible name. |
159
- | [heading](variables/heading.md) | A heading, by accessible name. |
160
- | [http](variables/http.md) | Generic HTTP contract helpers for any URL. The url is absolute (string or RegExp), or a PATH FORM starting with `/` — `http.get('/articles/{{uuid}}')` matches that path on ANY origin, which is what an app calling its own backend needs. An optional [HttpContractFilter](type-aliases/HttpContractFilter.md) narrows matching by body, headers, or query — a request that hits the URL/method but fails the filter counts as unmatched (strict contracts, CONVENTIONS D7). |
161
- | [intercept](variables/intercept.md) | The module-scope network double, on msw's node server — what a test with no chain to hang contracts on reaches for (chapter 16). |
162
- | [link](variables/link.md) | A link, by accessible name. |
163
- | [listitem](variables/listitem.md) | An item of a list, by its text. Retires the `.first()` of an unnamed `<li>`. |
164
- | [main](variables/main.md) | The `main` landmark — the primary content of the document. |
165
- | [match](variables/match.md) | - |
166
- | [navigation](variables/navigation.md) | The `navigation` landmark — a `<nav>`. Name it when a page has several. |
167
- | [openai](variables/openai.md) | OpenAI API intercept helpers. |
168
- | [option](variables/option.md) | An option of a select or a listbox, by its label — named inside the field that holds it: `within(field('Channel'), option('LinkedIn'))`. |
169
- | [region](variables/region.md) | The `region` landmark — a `<section>` carrying an accessible name. |
170
- | [row](variables/row.md) | A row of a table or grid, by the text of its cells. |
171
- | [search](variables/search.md) | The `search` landmark. |
172
- | [specification](variables/specification.md) | - |
173
- | [status](variables/status.md) | A live region announcing a result — `role="status"`, an `<output>`. |
174
- | [table](variables/table.md) | A table, by its caption or accessible name. |
175
-
176
- ## Functions
177
-
178
- | Function | Description |
179
- | ------ | ------ |
180
- | [defineContract](functions/defineContract.md) | Declare one contract. Identity function — its value is the enforced shape and the naming convention: |
181
- | [defineContracts](functions/defineContracts.md) | Compose contracts into the artifact a test imports — it's contracts all the way down: a composite may extend contracts, lists, and other composites, recursively, order preserved. |
182
- | [disabled](functions/disabled.md) | Whether the element accepts input: `see(disabled(button('Delete')))` asserts it refuses, `see(enabled(button('Delete')))` that it takes it. |
183
- | [enabled](functions/enabled.md) | The other direction of [disabled](functions/disabled.md) — the element takes input. |
184
- | [focused](functions/focused.md) | Where the keyboard is: `see(focused(button('Open')))` asserts the element has focus, `gone(focused(x))` that it does not. |
185
- | [mockOf](functions/mockOf.md) | A typed double for an injected port — the fourth rung of the doubles ladder (docs/18-conventions.md), and the only one a module test may build itself. |
186
- | [postgres](functions/postgres.md) | Create a PostgreSQL service handle. |
187
- | [process](functions/process.md) | Declare an external process the framework owns for the life of the specification. |
188
- | [redis](functions/redis.md) | Create a Redis service handle. |
189
- | [required](functions/required.md) | The value, or a failure that says what was missing and why it mattered. |
190
- | [selected](functions/selected.md) | Which option the field is on: `see(selected(option('LinkedIn')))`, and `gone(selected(option('X')))` for the one it left. |
191
- | [sqlite](functions/sqlite.md) | Create a SQLite service handle. Uses file-copy isolation for parallel tests. |
192
- | [testId](functions/testId.md) | The escape hatch: an element by `data-testid`. Prefer user-facing elements. |
193
- | [text](functions/text.md) | Wrap an arbitrary string into a [TextAccessor](interfaces/TextAccessor.md) anchored on the calling test's directory — the same caller-detection the builders use. |
194
- | [valued](functions/valued.md) | What the field holds: `see(valued(field('Title'), 'Launch teaser'))`, and `gone(valued(field('Title'), '…'))` for a value it no longer holds. |
195
- | [waitUntil](functions/waitUntil.md) | Wait until a condition holds — the sanctioned answer to "the thing I am specifying is not ready yet". |
196
- | [within](functions/within.md) | Restrict a descriptor to the inside of another — the answer to ambiguity, and the one the framework prefers over a test id. |
@@ -1,87 +0,0 @@
1
- <!-- GENERATED by `typescript docs` — DO NOT EDIT -->
2
- # Interface: BaseResult
3
-
4
- Defined in: [src/model/result/result.ts:34](https://github.com/jterrazz/package-test/blob/main/src/model/result/result.ts#L34)
5
-
6
- Base result - common accessors available after any action type.
7
- Extended by HttpResult, CliResult, and used directly by job results.
8
-
9
- Every result carries a fresh [CaptureScope](CaptureScope.md): `match.ref()` captures
10
- and `{{type#ref}}` placeholders are scoped to one spec execution.
11
-
12
- ## Extended by
13
-
14
- - [`CliResult`](CliResult.md)
15
- - [`CallResult`](CallResult.md)
16
- - [`HttpResult`](HttpResult.md)
17
- - [`ScreenResult`](ScreenResult.md)
18
- - [`FetchResult`](FetchResult.md)
19
- - [`PageResult`](PageResult.md)
20
-
21
- ## Methods
22
-
23
- ### directory()
24
-
25
- ```ts
26
- directory(path?): DirectoryAccessor;
27
- ```
28
-
29
- Defined in: [src/model/result/result.ts:55](https://github.com/jterrazz/package-test/blob/main/src/model/result/result.ts#L55)
30
-
31
- Access a directory (relative to the working directory) for snapshot assertions.
32
-
33
- #### Parameters
34
-
35
- | Parameter | Type | Default value |
36
- | ------ | ------ | ------ |
37
- | `path` | `string` | `'.'` |
38
-
39
- #### Returns
40
-
41
- [`DirectoryAccessor`](DirectoryAccessor.md)
42
-
43
- ***
44
-
45
- ### file()
46
-
47
- ```ts
48
- file(path): FileAccessor;
49
- ```
50
-
51
- Defined in: [src/model/result/result.ts:61](https://github.com/jterrazz/package-test/blob/main/src/model/result/result.ts#L61)
52
-
53
- Access a single file (relative to the working directory) for content assertions.
54
-
55
- #### Parameters
56
-
57
- | Parameter | Type |
58
- | ------ | ------ |
59
- | `path` | `string` |
60
-
61
- #### Returns
62
-
63
- [`FileAccessor`](../type-aliases/FileAccessor.md)
64
-
65
- ***
66
-
67
- ### table()
68
-
69
- ```ts
70
- table(tableName, options?): TableAccessor;
71
- ```
72
-
73
- Defined in: [src/model/result/result.ts:86](https://github.com/jterrazz/package-test/blob/main/src/model/result/result.ts#L86)
74
-
75
- Access a database table for row-level assertions via expect() matchers.
76
-
77
- #### Parameters
78
-
79
- | Parameter | Type |
80
- | ------ | ------ |
81
- | `tableName` | `string` |
82
- | `options?` | \{ `database?`: `string`; \} |
83
- | `options.database?` | `string` |
84
-
85
- #### Returns
86
-
87
- [`TableAccessor`](TableAccessor.md)
@@ -1,160 +0,0 @@
1
- <!-- GENERATED by `typescript docs` — DO NOT EDIT -->
2
- # Interface: CallResult\<Returned\>
3
-
4
- Defined in: [src/facets/integration/integration.result.ts:60](https://github.com/jterrazz/package-test/blob/main/src/facets/integration/integration.result.ts#L60)
5
-
6
- The result of an in-process call — the integration facet's whole surface.
7
-
8
- Two readings, never both: `value` is what the call RETURNED, `error` is
9
- what it THREW. A module that refuses is specified the same way a module
10
- that answers is, and neither needs a `try`/`catch` in the test — a shape
11
- that costs a refusal spec three times the size of the happy one, and that
12
- quietly passes when nothing throws at all.
13
-
14
- Both are the package's ordinary accessors, so the golden mechanism reaches
15
- them, and `Returned` is what `.call<T>()` returned — `result.value.value` is
16
- that type, not `unknown`, so a one-field reading needs no golden file: `toMatch('<name>.json'|'<name>.txt')`, the `{{token}}` grammar,
17
- `{ frozen }` and `TEST_UPDATE=1` all work here exactly as on an HTTP
18
- response or a command's stdout.
19
-
20
- ## Extends
21
-
22
- - [`BaseResult`](BaseResult.md)
23
-
24
- ## Type Parameters
25
-
26
- | Type Parameter | Default type |
27
- | ------ | ------ |
28
- | `Returned` | `unknown` |
29
-
30
- ## Accessors
31
-
32
- ### error
33
-
34
- #### Get Signature
35
-
36
- ```ts
37
- get error(): TextAccessor;
38
- ```
39
-
40
- Defined in: [src/facets/integration/integration.result.ts:78](https://github.com/jterrazz/package-test/blob/main/src/facets/integration/integration.result.ts#L78)
41
-
42
- What the call THREW, as text — the message of an `Error`, the value
43
- itself when something else was thrown, and empty when it returned.
44
-
45
- Empty rather than absent on purpose: `await expect(result.error).toBeEmpty()`
46
- is how a spec says "and it did not refuse" — awaited, because the
47
- matcher answers a promise on every subject it takes, and a dropped one
48
- passes the test while the failure surfaces as an unhandled rejection
49
- (D2 refuses the bare form).
50
-
51
- ##### Returns
52
-
53
- [`TextAccessor`](TextAccessor.md)
54
-
55
- ***
56
-
57
- ### value
58
-
59
- #### Get Signature
60
-
61
- ```ts
62
- get value(): CallValue<Returned>;
63
- ```
64
-
65
- Defined in: [src/facets/integration/integration.result.ts:96](https://github.com/jterrazz/package-test/blob/main/src/facets/integration/integration.result.ts#L96)
66
-
67
- What the call RETURNED. A string reads as a stream (`<name>.txt`),
68
- anything else as JSON (`<name>.json`) — the same two subjects every
69
- other facet's results are built from, chosen on the value in hand and
70
- typed by CallValue, which answers for the three ways a type can
71
- relate to `string`.
72
-
73
- A call that threw has no value to choose an accessor on, so `value` is
74
- the JSON reading of `null` whatever the declared type promises: what a
75
- refusal produced is [CallResult.error](#error), and that is where a spec
76
- reads it.
77
-
78
- ##### Returns
79
-
80
- `CallValue`\<`Returned`\>
81
-
82
- ## Methods
83
-
84
- ### directory()
85
-
86
- ```ts
87
- directory(path?): DirectoryAccessor;
88
- ```
89
-
90
- Defined in: [src/model/result/result.ts:55](https://github.com/jterrazz/package-test/blob/main/src/model/result/result.ts#L55)
91
-
92
- Access a directory (relative to the working directory) for snapshot assertions.
93
-
94
- #### Parameters
95
-
96
- | Parameter | Type | Default value |
97
- | ------ | ------ | ------ |
98
- | `path` | `string` | `'.'` |
99
-
100
- #### Returns
101
-
102
- [`DirectoryAccessor`](DirectoryAccessor.md)
103
-
104
- #### Inherited from
105
-
106
- [`BaseResult`](BaseResult.md).[`directory`](BaseResult.md#directory)
107
-
108
- ***
109
-
110
- ### file()
111
-
112
- ```ts
113
- file(path): FileAccessor;
114
- ```
115
-
116
- Defined in: [src/model/result/result.ts:61](https://github.com/jterrazz/package-test/blob/main/src/model/result/result.ts#L61)
117
-
118
- Access a single file (relative to the working directory) for content assertions.
119
-
120
- #### Parameters
121
-
122
- | Parameter | Type |
123
- | ------ | ------ |
124
- | `path` | `string` |
125
-
126
- #### Returns
127
-
128
- [`FileAccessor`](../type-aliases/FileAccessor.md)
129
-
130
- #### Inherited from
131
-
132
- [`BaseResult`](BaseResult.md).[`file`](BaseResult.md#file)
133
-
134
- ***
135
-
136
- ### table()
137
-
138
- ```ts
139
- table(tableName, options?): TableAccessor;
140
- ```
141
-
142
- Defined in: [src/model/result/result.ts:86](https://github.com/jterrazz/package-test/blob/main/src/model/result/result.ts#L86)
143
-
144
- Access a database table for row-level assertions via expect() matchers.
145
-
146
- #### Parameters
147
-
148
- | Parameter | Type |
149
- | ------ | ------ |
150
- | `tableName` | `string` |
151
- | `options?` | \{ `database?`: `string`; \} |
152
- | `options.database?` | `string` |
153
-
154
- #### Returns
155
-
156
- [`TableAccessor`](TableAccessor.md)
157
-
158
- #### Inherited from
159
-
160
- [`BaseResult`](BaseResult.md).[`table`](BaseResult.md#table)
@@ -1,82 +0,0 @@
1
- <!-- GENERATED by `typescript docs` — DO NOT EDIT -->
2
- # Interface: CaptureScope
3
-
4
- Defined in: [src/model/matching/match.ts:221](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L221)
5
-
6
- Named captures recorded by `match.ref()` / `{{type#ref}}` placeholders.
7
- One scope lives on each spec result — every assertion chained off the same
8
- result shares it, and a new chain starts fresh.
9
-
10
- ## Properties
11
-
12
- ### workdir?
13
-
14
- ```ts
15
- optional workdir?: string;
16
- ```
17
-
18
- Defined in: [src/model/matching/match.ts:227](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L227)
19
-
20
- The exact working directory of the current spec, when the framework
21
- knows it (cli mode). Drives the `{{workdir}}` token / `match.workdir()`.
22
-
23
- ## Methods
24
-
25
- ### get()
26
-
27
- ```ts
28
- get(name): unknown;
29
- ```
30
-
31
- Defined in: [src/model/matching/match.ts:233](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L233)
32
-
33
- #### Parameters
34
-
35
- | Parameter | Type |
36
- | ------ | ------ |
37
- | `name` | `string` |
38
-
39
- #### Returns
40
-
41
- `unknown`
42
-
43
- ***
44
-
45
- ### has()
46
-
47
- ```ts
48
- has(name): boolean;
49
- ```
50
-
51
- Defined in: [src/model/matching/match.ts:237](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L237)
52
-
53
- #### Parameters
54
-
55
- | Parameter | Type |
56
- | ------ | ------ |
57
- | `name` | `string` |
58
-
59
- #### Returns
60
-
61
- `boolean`
62
-
63
- ***
64
-
65
- ### set()
66
-
67
- ```ts
68
- set(name, value): void;
69
- ```
70
-
71
- Defined in: [src/model/matching/match.ts:241](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L241)
72
-
73
- #### Parameters
74
-
75
- | Parameter | Type |
76
- | ------ | ------ |
77
- | `name` | `string` |
78
- | `value` | `unknown` |
79
-
80
- #### Returns
81
-
82
- `void`