@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.
- package/README.md +45 -171
- package/dist/browser/index.js +1 -2980
- package/dist/browser/services.js +1 -0
- package/dist/browser/stubs.js +1 -0
- package/dist/browser-shared-index.browser.js +3233 -0
- package/dist/checker.d.ts +6 -1
- package/dist/checker.js +3721 -2624
- package/dist/config.d.ts +40 -0
- package/dist/config.js +309 -0
- package/dist/in-place.global-setup.d.ts +12 -0
- package/dist/in-place.global-setup.js +21 -0
- package/dist/index.d.ts +1641 -3004
- package/dist/index.js +5095 -3835
- package/dist/mobile-session.global-setup.d.ts +15 -0
- package/dist/mobile-session.global-setup.js +31 -0
- package/dist/oxlint.cjs +6069 -5634
- package/dist/oxlint.d.cts +43 -7212
- package/dist/oxlint.d.ts +43 -7212
- package/dist/oxlint.js +3979 -5799
- package/dist/route-coverage.global-setup.d.ts +43 -0
- package/dist/route-coverage.global-setup.js +1 -0
- package/dist/services.d.ts +3 -0
- package/dist/services.global-setup.d.ts +43 -0
- package/dist/services.global-setup.js +1 -0
- package/dist/services.js +597 -0
- package/dist/shared-appium.adapter.js +428 -0
- package/dist/shared-artifacts.js +34 -0
- package/dist/shared-chapter.js +7 -0
- package/dist/shared-container.port.d.ts +31 -0
- package/dist/shared-derived-projects.js +73 -0
- package/dist/shared-device.port.d.ts +189 -0
- package/dist/shared-exchange.js +447 -0
- package/dist/shared-in-place.js +172 -0
- package/dist/shared-index.services.d.ts +346 -0
- package/dist/shared-index.stubs.d.ts +287 -0
- package/dist/shared-json-shape.js +17 -0
- package/dist/shared-landmarks.js +71 -0
- package/dist/shared-ledger.js +68 -0
- package/dist/shared-listened-port.js +19 -0
- package/dist/shared-literate-plugin.js +184 -0
- package/dist/shared-manifest.js +1321 -0
- package/dist/shared-pause.js +22 -0
- package/dist/shared-peer.js +88 -0
- package/dist/shared-playwright.adapter.js +328 -0
- package/dist/shared-process-alive.js +13 -0
- package/dist/shared-process.adapter.js +74 -0
- package/dist/shared-record-key.js +13 -0
- package/dist/shared-refusal.js +35 -0
- package/dist/shared-resolve.js +24 -0
- package/dist/shared-route-coverage.global-setup.js +187 -0
- package/dist/shared-scenario-failure.js +198 -0
- package/dist/shared-serve.js +407 -0
- package/dist/shared-service-images.js +10 -0
- package/dist/shared-services.global-setup.js +174 -0
- package/dist/shared-session-ledger.js +305 -0
- package/dist/shared-setup-entry.js +12 -0
- package/dist/shared-source-scan.js +133 -0
- package/dist/shared-spec-document.js +303 -0
- package/dist/shared-spec-grammar.js +66 -0
- package/dist/shared-specifications.js +26 -0
- package/dist/shared-specs-modules.js +1033 -0
- package/dist/shared-stub-reply.js +167 -0
- package/dist/shared-stub-server.js +142 -0
- package/dist/shared-temp-root.global-setup.js +73 -0
- package/dist/shared-test-baseline.js +26 -0
- package/dist/shared-test-section.js +58 -0
- package/dist/shared-testcontainers.adapter.js +306 -0
- package/dist/shared-tokens.js +55 -0
- package/dist/shared-yaml-document.js +119 -0
- package/dist/stubs.d.ts +2 -0
- package/dist/stubs.js +657 -0
- package/dist/temp-root.global-setup.d.ts +7 -0
- package/dist/temp-root.global-setup.js +1 -0
- package/dist/vitest.d.ts +93 -164
- package/dist/vitest.js +382 -550
- package/docs/README.md +82 -36
- package/docs/concepts/architecture.md +118 -0
- package/docs/concepts/conventions.md +333 -0
- package/docs/guides/api-specs.md +374 -0
- package/docs/guides/cli-specs.md +566 -0
- package/docs/guides/component-specs.md +252 -0
- package/docs/guides/develop.md +97 -0
- package/docs/guides/integration-specs.md +181 -0
- package/docs/guides/job-specs.md +180 -0
- package/docs/guides/lint-specs.md +174 -0
- package/docs/guides/mobile-specs.md +319 -0
- package/docs/guides/module-tests.md +149 -0
- package/docs/guides/release.md +44 -0
- package/docs/guides/spec-documents.md +189 -0
- package/docs/guides/website-specs.md +413 -0
- package/docs/reference/assertions.md +345 -0
- package/docs/reference/glossary.md +20 -0
- package/docs/reference/linting.md +483 -0
- package/docs/reference/services.md +236 -0
- package/docs/reference/stubs.md +500 -0
- package/docs/reference/time-and-doubles.md +137 -0
- package/docs/reference/tokens.md +258 -0
- package/docs/reference/visitor.md +221 -0
- package/docs/start/getting-started.md +187 -0
- package/docs/start/set-up-a-project.md +228 -0
- package/package.json +56 -36
- package/schema/spec.schema.json +43 -17
- package/dist/appium.adapter.js +0 -489
- package/dist/artifacts.js +0 -32
- package/dist/fixtures.js +0 -110
- package/dist/literate.js +0 -1747
- package/dist/match.js +0 -804
- package/dist/playwright.adapter.js +0 -438
- package/dist/server.js +0 -160
- package/dist/stream.js +0 -321
- package/dist/substring-warning.js +0 -282
- package/docs/01-architecture.md +0 -95
- package/docs/02-developing.md +0 -351
- package/docs/03-testing.md +0 -495
- package/docs/04-operating.md +0 -101
- package/docs/05-module-tests.md +0 -152
- package/docs/06-integration.md +0 -180
- package/docs/07-component.md +0 -246
- package/docs/08-website.md +0 -404
- package/docs/09-mobile.md +0 -270
- package/docs/10-api.md +0 -264
- package/docs/11-jobs.md +0 -157
- package/docs/12-cli.md +0 -677
- package/docs/13-elements.md +0 -248
- package/docs/14-assertions.md +0 -314
- package/docs/15-tokens.md +0 -253
- package/docs/16-contracts.md +0 -438
- package/docs/17-services.md +0 -188
- package/docs/18-conventions.md +0 -332
- package/docs/19-linting.md +0 -512
- package/docs/decisions/001-v9-conventions-on-three-channels.md +0 -50
- package/docs/decisions/002-the-statique-channel-holds-only-what-upstream-does-not.md +0 -49
- package/docs/decisions/003-a-rendered-component-is-a-facet-on-vitest-browser-mode.md +0 -84
- package/docs/decisions/004-a-module-against-real-services-or-a-golden-is-the-integration-facet.md +0 -81
- package/docs/decisions/005-the-doubles-ladder-is-closed.md +0 -86
- package/docs/decisions/006-the-catalogue-reaches-a-file-by-its-role.md +0 -245
- package/docs/decisions/007-compose-mode-leaves-the-package.md +0 -53
- package/docs/decisions/008-vitest-5-node-24-and-the-native-seams-as-optional-peers.md +0 -75
- package/docs/decisions/_template.md +0 -22
- package/docs/reference/classes/Matcher.md +0 -120
- package/docs/reference/classes/ProcessHandle.md +0 -368
- package/docs/reference/functions/defineContract.md +0 -39
- package/docs/reference/functions/defineContracts.md +0 -36
- package/docs/reference/functions/disabled.md +0 -28
- package/docs/reference/functions/enabled.md +0 -20
- package/docs/reference/functions/focused.md +0 -26
- package/docs/reference/functions/mockOf.md +0 -79
- package/docs/reference/functions/postgres.md +0 -31
- package/docs/reference/functions/process.md +0 -33
- package/docs/reference/functions/redis.md +0 -28
- package/docs/reference/functions/required.md +0 -41
- package/docs/reference/functions/selected.md +0 -26
- package/docs/reference/functions/sqlite.md +0 -33
- package/docs/reference/functions/testId.md +0 -20
- package/docs/reference/functions/text.md +0 -40
- package/docs/reference/functions/valued.md +0 -28
- package/docs/reference/functions/waitUntil.md +0 -46
- package/docs/reference/functions/within.md +0 -29
- package/docs/reference/index.md +0 -196
- package/docs/reference/interfaces/BaseResult.md +0 -87
- package/docs/reference/interfaces/CallResult.md +0 -160
- package/docs/reference/interfaces/CaptureScope.md +0 -82
- package/docs/reference/interfaces/CliResult.md +0 -253
- package/docs/reference/interfaces/ContainerAccessor.md +0 -166
- package/docs/reference/interfaces/DirectoryAccessor.md +0 -33
- package/docs/reference/interfaces/FetchResult.md +0 -180
- package/docs/reference/interfaces/FilesystemAccessor.md +0 -46
- package/docs/reference/interfaces/HttpResult.md +0 -126
- package/docs/reference/interfaces/JsonAccessor.md +0 -46
- package/docs/reference/interfaces/PageResult.md +0 -356
- package/docs/reference/interfaces/RenderResult.md +0 -72
- package/docs/reference/interfaces/RenderedText.md +0 -110
- package/docs/reference/interfaces/ResponseAccessor.md +0 -47
- package/docs/reference/interfaces/ScreenResult.md +0 -128
- package/docs/reference/interfaces/TableAccessor.md +0 -26
- package/docs/reference/interfaces/TextAccessor.md +0 -96
- package/docs/reference/type-aliases/ApiHandle.md +0 -68
- package/docs/reference/type-aliases/ApiSpecification.md +0 -213
- package/docs/reference/type-aliases/ApiSpecificationOptions.md +0 -68
- package/docs/reference/type-aliases/BrowserConsoleMessage.md +0 -30
- package/docs/reference/type-aliases/BrowserLinkElement.md +0 -50
- package/docs/reference/type-aliases/BrowserMetaElement.md +0 -40
- package/docs/reference/type-aliases/BrowserOpenOptions.md +0 -87
- package/docs/reference/type-aliases/BrowserPage.md +0 -132
- package/docs/reference/type-aliases/BrowserPort.md +0 -51
- package/docs/reference/type-aliases/CliEnv.md +0 -11
- package/docs/reference/type-aliases/CliHandle.md +0 -80
- package/docs/reference/type-aliases/CliInput.md +0 -36
- package/docs/reference/type-aliases/CliOutput.md +0 -46
- package/docs/reference/type-aliases/CliPort.md +0 -58
- package/docs/reference/type-aliases/CliSpecification.md +0 -144
- package/docs/reference/type-aliases/CliSpecificationOptions.md +0 -134
- package/docs/reference/type-aliases/ComponentChain.md +0 -156
- package/docs/reference/type-aliases/ComponentScenario.md +0 -20
- package/docs/reference/type-aliases/ComponentUi.md +0 -47
- package/docs/reference/type-aliases/ComponentVisitor.md +0 -10
- package/docs/reference/type-aliases/ContainerPort.md +0 -113
- package/docs/reference/type-aliases/Contract.md +0 -68
- package/docs/reference/type-aliases/ContractInput.md +0 -13
- package/docs/reference/type-aliases/ContractRequest.md +0 -95
- package/docs/reference/type-aliases/ContractResponder.md +0 -23
- package/docs/reference/type-aliases/ContractResponse.md +0 -78
- package/docs/reference/type-aliases/ContractResponseValue.md +0 -13
- package/docs/reference/type-aliases/Contracts.md +0 -48
- package/docs/reference/type-aliases/DatabaseKeys.md +0 -16
- package/docs/reference/type-aliases/DatabasePort.md +0 -72
- package/docs/reference/type-aliases/DeviceOpenOptions.md +0 -46
- package/docs/reference/type-aliases/DevicePort.md +0 -51
- package/docs/reference/type-aliases/DeviceScreen.md +0 -32
- package/docs/reference/type-aliases/DeviceTimeouts.md +0 -39
- package/docs/reference/type-aliases/DockerSpecConfig.md +0 -43
- package/docs/reference/type-aliases/DomMount.md +0 -21
- package/docs/reference/type-aliases/ElementKind.md +0 -27
- package/docs/reference/type-aliases/ElementMatch.md +0 -74
- package/docs/reference/type-aliases/ElementOptions.md +0 -29
- package/docs/reference/type-aliases/ElementRef.md +0 -128
- package/docs/reference/type-aliases/ExecOptions.md +0 -37
- package/docs/reference/type-aliases/FileAccessor.md +0 -54
- package/docs/reference/type-aliases/HonoApp.md +0 -31
- package/docs/reference/type-aliases/HttpContractFilter.md +0 -49
- package/docs/reference/type-aliases/HttpResponseInit.md +0 -46
- package/docs/reference/type-aliases/HttpStreamInit.md +0 -58
- package/docs/reference/type-aliases/IntegrationHandle.md +0 -46
- package/docs/reference/type-aliases/IntegrationSpecification.md +0 -111
- package/docs/reference/type-aliases/IntegrationSpecificationOptions.md +0 -42
- package/docs/reference/type-aliases/Intercept.md +0 -19
- package/docs/reference/type-aliases/InterceptOptions.md +0 -28
- package/docs/reference/type-aliases/InterceptScope.md +0 -11
- package/docs/reference/type-aliases/IsolationStrategy.md +0 -75
- package/docs/reference/type-aliases/JobHandle.md +0 -34
- package/docs/reference/type-aliases/JobsHandle.md +0 -57
- package/docs/reference/type-aliases/JobsResult.md +0 -16
- package/docs/reference/type-aliases/JobsSpecification.md +0 -94
- package/docs/reference/type-aliases/JobsSpecificationOptions.md +0 -56
- package/docs/reference/type-aliases/LandmarkKind.md +0 -20
- package/docs/reference/type-aliases/LiterateRunFlags.md +0 -27
- package/docs/reference/type-aliases/LiterateServeRegistration.md +0 -70
- package/docs/reference/type-aliases/MatchFixtureOptions.md +0 -27
- package/docs/reference/type-aliases/MatchableRequest.md +0 -61
- package/docs/reference/type-aliases/MatcherKind.md +0 -34
- package/docs/reference/type-aliases/MobileBackendOptions.md +0 -28
- package/docs/reference/type-aliases/MobileElementKind.md +0 -14
- package/docs/reference/type-aliases/MobileElementMatch.md +0 -60
- package/docs/reference/type-aliases/MobileElementRef.md +0 -20
- package/docs/reference/type-aliases/MobileHandle.md +0 -65
- package/docs/reference/type-aliases/MobileScenario.md +0 -20
- package/docs/reference/type-aliases/MobileSpecification.md +0 -51
- package/docs/reference/type-aliases/MobileSpecificationOptions.md +0 -126
- package/docs/reference/type-aliases/MobileVisitor.md +0 -81
- package/docs/reference/type-aliases/MockOfOptions.md +0 -26
- package/docs/reference/type-aliases/MockPort.md +0 -10
- package/docs/reference/type-aliases/PinnedClock.md +0 -10
- package/docs/reference/type-aliases/PostgresOptions.md +0 -32
- package/docs/reference/type-aliases/ProcessOptions.md +0 -112
- package/docs/reference/type-aliases/RedisOptions.md +0 -20
- package/docs/reference/type-aliases/RenderSubject.md +0 -12
- package/docs/reference/type-aliases/ScreenNode.md +0 -67
- package/docs/reference/type-aliases/ServerPort.md +0 -36
- package/docs/reference/type-aliases/ServerResponse.md +0 -46
- package/docs/reference/type-aliases/ServerSpec.md +0 -21
- package/docs/reference/type-aliases/ServiceHandle.md +0 -216
- package/docs/reference/type-aliases/ServiceRecord.md +0 -12
- package/docs/reference/type-aliases/SpecDocument.md +0 -84
- package/docs/reference/type-aliases/SpecEnvToken.md +0 -21
- package/docs/reference/type-aliases/SpecFileAssertion.md +0 -27
- package/docs/reference/type-aliases/SpecFixture.md +0 -30
- package/docs/reference/type-aliases/SpecKind.md +0 -8
- package/docs/reference/type-aliases/SpecRun.md +0 -108
- package/docs/reference/type-aliases/SpecServeEntry.md +0 -40
- package/docs/reference/type-aliases/SpecStream.md +0 -32
- package/docs/reference/type-aliases/SpecificationConfig.md +0 -290
- package/docs/reference/type-aliases/SqliteOptions.md +0 -36
- package/docs/reference/type-aliases/SseEvent.md +0 -58
- package/docs/reference/type-aliases/StreamBody.md +0 -61
- package/docs/reference/type-aliases/TextFilter.md +0 -22
- package/docs/reference/type-aliases/VisitScenario.md +0 -20
- package/docs/reference/type-aliases/Visitor.md +0 -215
- package/docs/reference/type-aliases/WaitUntilOptions.md +0 -46
- package/docs/reference/type-aliases/WebsiteBackendOptions.md +0 -37
- package/docs/reference/type-aliases/WebsiteHandle.md +0 -51
- package/docs/reference/type-aliases/WebsiteSpecification.md +0 -118
- package/docs/reference/type-aliases/WebsiteSpecificationOptions.md +0 -40
- package/docs/reference/variables/anthropic.md +0 -19
- package/docs/reference/variables/banner.md +0 -10
- package/docs/reference/variables/button.md +0 -10
- package/docs/reference/variables/clock.md +0 -16
- package/docs/reference/variables/complementary.md +0 -10
- package/docs/reference/variables/component.md +0 -10
- package/docs/reference/variables/content.md +0 -10
- package/docs/reference/variables/contentinfo.md +0 -10
- package/docs/reference/variables/dialog.md +0 -10
- package/docs/reference/variables/field.md +0 -10
- package/docs/reference/variables/form.md +0 -10
- package/docs/reference/variables/heading.md +0 -10
- package/docs/reference/variables/http.md +0 -40
- package/docs/reference/variables/intercept.md +0 -11
- package/docs/reference/variables/link.md +0 -10
- package/docs/reference/variables/listitem.md +0 -10
- package/docs/reference/variables/main.md +0 -10
- package/docs/reference/variables/match.md +0 -8
- package/docs/reference/variables/navigation.md +0 -10
- package/docs/reference/variables/openai.md +0 -21
- package/docs/reference/variables/option.md +0 -17
- package/docs/reference/variables/region.md +0 -10
- package/docs/reference/variables/row.md +0 -10
- package/docs/reference/variables/search.md +0 -10
- package/docs/reference/variables/specification.md +0 -8
- package/docs/reference/variables/status.md +0 -10
- 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/
|
|
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
|
-
|
|
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
|
|
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/
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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/
|
|
119
|
-
|
|
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
|
-
|
|
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
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
|
|
153
|
-
|
|
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/
|
|
162
|
-
/** `integration()
|
|
163
|
-
|
|
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/
|
|
166
|
-
/** `
|
|
167
|
-
|
|
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/
|
|
170
|
-
/**
|
|
171
|
-
|
|
172
|
-
|
|
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/
|
|
177
|
-
/**
|
|
178
|
-
type
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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/
|
|
188
|
-
/** `unit()
|
|
189
|
-
type UnitProjectOptions =
|
|
190
|
-
/**
|
|
191
|
-
|
|
192
|
-
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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 {
|
|
135
|
+
export type { ApiProjectOptions, CliProjectOptions, ComponentProjectOptions, InProcessProjectOptions, IntegrationProjectOptions, JobProjectOptions, LintProjectOptions, LiterateDoor, LiterateOptions, LiteratePlugin, MobileProjectOptions, SpecificationProjectOptions, UnitProjectOptions, WebsiteProjectOptions };
|
|
136
|
+
//# sourceMappingURL=vitest.d.ts.map
|