@manifest-network/manifest-mcp-core 0.1.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/dist/__test-utils__/callTool.d.ts +29 -0
- package/dist/__test-utils__/callTool.d.ts.map +1 -0
- package/dist/__test-utils__/callTool.js +45 -0
- package/dist/__test-utils__/callTool.js.map +1 -0
- package/dist/__test-utils__/mocks.d.ts +125 -0
- package/dist/__test-utils__/mocks.d.ts.map +1 -0
- package/dist/__test-utils__/mocks.js +146 -0
- package/dist/__test-utils__/mocks.js.map +1 -0
- package/dist/client.d.ts +67 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +209 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +30 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +127 -0
- package/dist/config.js.map +1 -0
- package/dist/cosmos.d.ts +24 -0
- package/dist/cosmos.d.ts.map +1 -0
- package/dist/cosmos.js +85 -0
- package/dist/cosmos.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +20 -0
- package/dist/lcd-adapter.d.ts +15 -0
- package/dist/lcd-adapter.d.ts.map +1 -0
- package/dist/lcd-adapter.js +98 -0
- package/dist/lcd-adapter.js.map +1 -0
- package/dist/logger.d.ts +20 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +43 -0
- package/dist/logger.js.map +1 -0
- package/dist/modules.d.ts +63 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +759 -0
- package/dist/modules.js.map +1 -0
- package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +78 -0
- package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js.map +1 -0
- package/dist/node_modules/@vitest/expect/dist/index.d.ts +802 -0
- package/dist/node_modules/@vitest/expect/dist/index.d.ts.map +1 -0
- package/dist/node_modules/@vitest/expect/dist/index.js +1457 -0
- package/dist/node_modules/@vitest/expect/dist/index.js.map +1 -0
- package/dist/node_modules/@vitest/pretty-format/dist/index.d.ts +95 -0
- package/dist/node_modules/@vitest/pretty-format/dist/index.d.ts.map +1 -0
- package/dist/node_modules/@vitest/pretty-format/dist/index.js +877 -0
- package/dist/node_modules/@vitest/pretty-format/dist/index.js.map +1 -0
- package/dist/node_modules/@vitest/runner/dist/chunk-tasks.js +91 -0
- package/dist/node_modules/@vitest/runner/dist/chunk-tasks.js.map +1 -0
- package/dist/node_modules/@vitest/runner/dist/index.js +1381 -0
- package/dist/node_modules/@vitest/runner/dist/index.js.map +1 -0
- package/dist/node_modules/@vitest/runner/dist/tasks.d-D2GKpdwQ.d.ts +540 -0
- package/dist/node_modules/@vitest/runner/dist/tasks.d-D2GKpdwQ.d.ts.map +1 -0
- package/dist/node_modules/@vitest/runner/dist/utils.js +1 -0
- package/dist/node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts +16 -0
- package/dist/node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts.map +1 -0
- package/dist/node_modules/@vitest/snapshot/dist/index.d.ts +89 -0
- package/dist/node_modules/@vitest/snapshot/dist/index.d.ts.map +1 -0
- package/dist/node_modules/@vitest/snapshot/dist/index.js +649 -0
- package/dist/node_modules/@vitest/snapshot/dist/index.js.map +1 -0
- package/dist/node_modules/@vitest/snapshot/dist/rawSnapshot.d-U2kJUxDr.d.ts +40 -0
- package/dist/node_modules/@vitest/snapshot/dist/rawSnapshot.d-U2kJUxDr.d.ts.map +1 -0
- package/dist/node_modules/@vitest/spy/dist/index.d.ts +343 -0
- package/dist/node_modules/@vitest/spy/dist/index.d.ts.map +1 -0
- package/dist/node_modules/@vitest/spy/dist/index.js +386 -0
- package/dist/node_modules/@vitest/spy/dist/index.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +82 -0
- package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/diff.d.ts +14 -0
- package/dist/node_modules/@vitest/utils/dist/diff.d.ts.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/diff.js +1297 -0
- package/dist/node_modules/@vitest/utils/dist/diff.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/display.d.ts +15 -0
- package/dist/node_modules/@vitest/utils/dist/display.d.ts.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/display.js +558 -0
- package/dist/node_modules/@vitest/utils/dist/display.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/error.js +30 -0
- package/dist/node_modules/@vitest/utils/dist/error.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/helpers.js +181 -0
- package/dist/node_modules/@vitest/utils/dist/helpers.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/offset.js +27 -0
- package/dist/node_modules/@vitest/utils/dist/offset.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/serialize.js +77 -0
- package/dist/node_modules/@vitest/utils/dist/serialize.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/source-map.js +367 -0
- package/dist/node_modules/@vitest/utils/dist/source-map.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/timers.js +37 -0
- package/dist/node_modules/@vitest/utils/dist/timers.js.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts +38 -0
- package/dist/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts.map +1 -0
- package/dist/node_modules/@vitest/utils/dist/types.d.ts +25 -0
- package/dist/node_modules/@vitest/utils/dist/types.d.ts.map +1 -0
- package/dist/node_modules/chai/index.js +2875 -0
- package/dist/node_modules/chai/index.js.map +1 -0
- package/dist/node_modules/magic-string/dist/magic-string.es.js +939 -0
- package/dist/node_modules/magic-string/dist/magic-string.es.js.map +1 -0
- package/dist/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +85 -0
- package/dist/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js.map +1 -0
- package/dist/node_modules/tinybench/dist/index.d.ts +91 -0
- package/dist/node_modules/tinybench/dist/index.d.ts.map +1 -0
- package/dist/node_modules/tinyrainbow/dist/index.d.ts +9 -0
- package/dist/node_modules/tinyrainbow/dist/index.d.ts.map +1 -0
- package/dist/node_modules/tinyrainbow/dist/index.js +86 -0
- package/dist/node_modules/tinyrainbow/dist/index.js.map +1 -0
- package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +6 -0
- package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js.map +1 -0
- package/dist/node_modules/vitest/dist/chunks/benchmark.D0SlKNbZ.js +41 -0
- package/dist/node_modules/vitest/dist/chunks/benchmark.D0SlKNbZ.js.map +1 -0
- package/dist/node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts +12 -0
- package/dist/node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts.map +1 -0
- package/dist/node_modules/vitest/dist/chunks/global.d.x-ILCfAE.d.ts +100 -0
- package/dist/node_modules/vitest/dist/chunks/global.d.x-ILCfAE.d.ts.map +1 -0
- package/dist/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js +57 -0
- package/dist/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js.map +1 -0
- package/dist/node_modules/vitest/dist/chunks/rpc.d.BFMWpdph.d.ts +13 -0
- package/dist/node_modules/vitest/dist/chunks/rpc.d.BFMWpdph.d.ts.map +1 -0
- package/dist/node_modules/vitest/dist/chunks/test.CTcmp4Su.js +2791 -0
- package/dist/node_modules/vitest/dist/chunks/test.CTcmp4Su.js.map +1 -0
- package/dist/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js +44 -0
- package/dist/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js.map +1 -0
- package/dist/node_modules/vitest/dist/index.d.ts +9 -0
- package/dist/queries/auth.d.ts +15 -0
- package/dist/queries/auth.d.ts.map +1 -0
- package/dist/queries/auth.js +58 -0
- package/dist/queries/auth.js.map +1 -0
- package/dist/queries/bank.d.ts +15 -0
- package/dist/queries/bank.d.ts.map +1 -0
- package/dist/queries/bank.js +93 -0
- package/dist/queries/bank.js.map +1 -0
- package/dist/queries/billing.d.ts +15 -0
- package/dist/queries/billing.d.ts.map +1 -0
- package/dist/queries/billing.js +114 -0
- package/dist/queries/billing.js.map +1 -0
- package/dist/queries/distribution.d.ts +15 -0
- package/dist/queries/distribution.d.ts.map +1 -0
- package/dist/queries/distribution.js +73 -0
- package/dist/queries/distribution.js.map +1 -0
- package/dist/queries/gov.d.ts +15 -0
- package/dist/queries/gov.d.ts.map +1 -0
- package/dist/queries/gov.js +98 -0
- package/dist/queries/gov.js.map +1 -0
- package/dist/queries/group.d.ts +15 -0
- package/dist/queries/group.d.ts.map +1 -0
- package/dist/queries/group.js +159 -0
- package/dist/queries/group.js.map +1 -0
- package/dist/queries/index.d.ts +10 -0
- package/dist/queries/index.js +10 -0
- package/dist/queries/sku.d.ts +16 -0
- package/dist/queries/sku.d.ts.map +1 -0
- package/dist/queries/sku.js +85 -0
- package/dist/queries/sku.js.map +1 -0
- package/dist/queries/staking.d.ts +15 -0
- package/dist/queries/staking.d.ts.map +1 -0
- package/dist/queries/staking.js +127 -0
- package/dist/queries/staking.js.map +1 -0
- package/dist/queries/utils.d.ts +54 -0
- package/dist/queries/utils.d.ts.map +1 -0
- package/dist/queries/utils.js +74 -0
- package/dist/queries/utils.js.map +1 -0
- package/dist/retry.d.ts +48 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +106 -0
- package/dist/retry.js.map +1 -0
- package/dist/server-utils.d.ts +61 -0
- package/dist/server-utils.d.ts.map +1 -0
- package/dist/server-utils.js +156 -0
- package/dist/server-utils.js.map +1 -0
- package/dist/tools/fundCredits.d.ts +8 -0
- package/dist/tools/fundCredits.d.ts.map +1 -0
- package/dist/tools/fundCredits.js +9 -0
- package/dist/tools/fundCredits.js.map +1 -0
- package/dist/tools/getBalance.d.ts +26 -0
- package/dist/tools/getBalance.d.ts.map +1 -0
- package/dist/tools/getBalance.js +59 -0
- package/dist/tools/getBalance.js.map +1 -0
- package/dist/tools/stopApp.d.ts +13 -0
- package/dist/tools/stopApp.d.ts.map +1 -0
- package/dist/tools/stopApp.js +15 -0
- package/dist/tools/stopApp.js.map +1 -0
- package/dist/transactions/bank.d.ts +11 -0
- package/dist/transactions/bank.d.ts.map +1 -0
- package/dist/transactions/bank.js +75 -0
- package/dist/transactions/bank.js.map +1 -0
- package/dist/transactions/billing.d.ts +11 -0
- package/dist/transactions/billing.d.ts.map +1 -0
- package/dist/transactions/billing.js +189 -0
- package/dist/transactions/billing.js.map +1 -0
- package/dist/transactions/distribution.d.ts +11 -0
- package/dist/transactions/distribution.d.ts.map +1 -0
- package/dist/transactions/distribution.js +60 -0
- package/dist/transactions/distribution.js.map +1 -0
- package/dist/transactions/gov.d.ts +11 -0
- package/dist/transactions/gov.d.ts.map +1 -0
- package/dist/transactions/gov.js +108 -0
- package/dist/transactions/gov.js.map +1 -0
- package/dist/transactions/group.d.ts +11 -0
- package/dist/transactions/group.d.ts.map +1 -0
- package/dist/transactions/group.js +347 -0
- package/dist/transactions/group.js.map +1 -0
- package/dist/transactions/index.d.ts +10 -0
- package/dist/transactions/index.js +10 -0
- package/dist/transactions/manifest.d.ts +11 -0
- package/dist/transactions/manifest.d.ts.map +1 -0
- package/dist/transactions/manifest.js +59 -0
- package/dist/transactions/manifest.js.map +1 -0
- package/dist/transactions/sku.d.ts +11 -0
- package/dist/transactions/sku.d.ts.map +1 -0
- package/dist/transactions/sku.js +191 -0
- package/dist/transactions/sku.js.map +1 -0
- package/dist/transactions/staking.d.ts +11 -0
- package/dist/transactions/staking.d.ts.map +1 -0
- package/dist/transactions/staking.js +79 -0
- package/dist/transactions/staking.js.map +1 -0
- package/dist/transactions/utils.d.ts +161 -0
- package/dist/transactions/utils.d.ts.map +1 -0
- package/dist/transactions/utils.js +272 -0
- package/dist/transactions/utils.js.map +1 -0
- package/dist/types.d.ts +390 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +45 -0
- package/dist/types.js.map +1 -0
- package/dist/validation.d.ts +30 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +53 -0
- package/dist/validation.js.map +1 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/dist/wallet/index.d.ts +4 -0
- package/dist/wallet/index.js +3 -0
- package/dist/wallet/mnemonic.d.ts +47 -0
- package/dist/wallet/mnemonic.d.ts.map +1 -0
- package/dist/wallet/mnemonic.js +97 -0
- package/dist/wallet/mnemonic.js.map +1 -0
- package/dist/wallet/sign-arbitrary.d.ts +12 -0
- package/dist/wallet/sign-arbitrary.d.ts.map +1 -0
- package/dist/wallet/sign-arbitrary.js +36 -0
- package/dist/wallet/sign-arbitrary.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
import { Awaitable, TestError } from "../../utils/dist/types.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/@vitest/runner/dist/tasks.d-D2GKpdwQ.d.ts
|
|
4
|
+
type RunMode = "run" | "skip" | "only" | "todo" | "queued";
|
|
5
|
+
type TaskState = RunMode | "pass" | "fail";
|
|
6
|
+
interface TaskBase {
|
|
7
|
+
/**
|
|
8
|
+
* Unique task identifier. Based on the file id and the position of the task.
|
|
9
|
+
* The id of the file task is based on the file path relative to root and project name.
|
|
10
|
+
* It will not change between runs.
|
|
11
|
+
* @example `1201091390`, `1201091390_0`, `1201091390_0_1`
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
/**
|
|
15
|
+
* Task name provided by the user. If no name was provided, it will be an empty string.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* Full name including the file path, any parent suites, and this task's name.
|
|
20
|
+
*
|
|
21
|
+
* Uses ` > ` as the separator between levels.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* // file
|
|
25
|
+
* 'test/task-names.test.ts'
|
|
26
|
+
* @example
|
|
27
|
+
* // suite
|
|
28
|
+
* 'test/task-names.test.ts > meal planning'
|
|
29
|
+
* 'test/task-names.test.ts > meal planning > grocery lists'
|
|
30
|
+
* @example
|
|
31
|
+
* // test
|
|
32
|
+
* 'test/task-names.test.ts > meal planning > grocery lists > calculates ingredients'
|
|
33
|
+
*/
|
|
34
|
+
fullName: string;
|
|
35
|
+
/**
|
|
36
|
+
* Full name excluding the file path, including any parent suites and this task's name. `undefined` for file tasks.
|
|
37
|
+
*
|
|
38
|
+
* Uses ` > ` as the separator between levels.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // file
|
|
42
|
+
* undefined
|
|
43
|
+
* @example
|
|
44
|
+
* // suite
|
|
45
|
+
* 'meal planning'
|
|
46
|
+
* 'meal planning > grocery lists'
|
|
47
|
+
* @example
|
|
48
|
+
* // test
|
|
49
|
+
* 'meal planning > grocery lists > calculates ingredients'
|
|
50
|
+
*/
|
|
51
|
+
fullTestName?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Task mode.
|
|
54
|
+
* - **skip**: task is skipped
|
|
55
|
+
* - **only**: only this task and other tasks with `only` mode will run
|
|
56
|
+
* - **todo**: task is marked as a todo, alias for `skip`
|
|
57
|
+
* - **run**: task will run or already ran
|
|
58
|
+
* - **queued**: task will start running next. It can only exist on the File
|
|
59
|
+
*/
|
|
60
|
+
mode: RunMode;
|
|
61
|
+
/**
|
|
62
|
+
* Custom metadata for the task. JSON reporter will save this data.
|
|
63
|
+
*/
|
|
64
|
+
meta: TaskMeta;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the task was produced with `.each()` method.
|
|
67
|
+
*/
|
|
68
|
+
each?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Whether the task should run concurrently with other tasks.
|
|
71
|
+
*/
|
|
72
|
+
concurrent?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Whether the tasks of the suite run in a random order.
|
|
75
|
+
*/
|
|
76
|
+
shuffle?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Suite that this task is part of. File task or the global suite will have no parent.
|
|
79
|
+
*/
|
|
80
|
+
suite?: Suite;
|
|
81
|
+
/**
|
|
82
|
+
* Result of the task. Suite and file tasks will only have the result if there
|
|
83
|
+
* was an error during collection or inside `afterAll`/`beforeAll`.
|
|
84
|
+
*/
|
|
85
|
+
result?: TaskResult;
|
|
86
|
+
/**
|
|
87
|
+
* Retry configuration for the task.
|
|
88
|
+
* - If a number, specifies how many times to retry
|
|
89
|
+
* - If an object, allows fine-grained retry control
|
|
90
|
+
* @default 0
|
|
91
|
+
*/
|
|
92
|
+
retry?: Retry;
|
|
93
|
+
/**
|
|
94
|
+
* The amount of times the task should be repeated after the successful run.
|
|
95
|
+
* If the task fails, it will not be retried unless `retry` is specified.
|
|
96
|
+
* @default 0
|
|
97
|
+
*/
|
|
98
|
+
repeats?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Location of the task in the file. This field is populated only if
|
|
101
|
+
* `includeTaskLocation` option is set. It is generated by calling `new Error`
|
|
102
|
+
* and parsing the stack trace, so the location might differ depending on the runtime.
|
|
103
|
+
*/
|
|
104
|
+
location?: Location;
|
|
105
|
+
/**
|
|
106
|
+
* If the test was collected by parsing the file AST, and the name
|
|
107
|
+
* is not a static string, this property will be set to `true`.
|
|
108
|
+
* @experimental
|
|
109
|
+
*/
|
|
110
|
+
dynamic?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Custom tags of the task. Useful for filtering tasks.
|
|
113
|
+
*/
|
|
114
|
+
tags?: string[];
|
|
115
|
+
}
|
|
116
|
+
interface TaskPopulated extends TaskBase {
|
|
117
|
+
/**
|
|
118
|
+
* File task. It's the root task of the file.
|
|
119
|
+
*/
|
|
120
|
+
file: File;
|
|
121
|
+
/**
|
|
122
|
+
* Whether the task should succeed if it fails. If the task fails, it will be marked as passed.
|
|
123
|
+
*/
|
|
124
|
+
fails?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Store promises (from async expects) to wait for them before finishing the test
|
|
127
|
+
*/
|
|
128
|
+
promises?: Promise<any>[];
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Custom metadata that can be used in reporters.
|
|
132
|
+
*/
|
|
133
|
+
interface TaskMeta {}
|
|
134
|
+
/**
|
|
135
|
+
* The result of calling a task.
|
|
136
|
+
*/
|
|
137
|
+
interface TaskResult {
|
|
138
|
+
/**
|
|
139
|
+
* State of the task. Inherits the `task.mode` during collection.
|
|
140
|
+
* When the task has finished, it will be changed to `pass` or `fail`.
|
|
141
|
+
* - **pass**: task ran successfully
|
|
142
|
+
* - **fail**: task failed
|
|
143
|
+
*/
|
|
144
|
+
state: TaskState;
|
|
145
|
+
/**
|
|
146
|
+
* Errors that occurred during the task execution. It is possible to have several errors
|
|
147
|
+
* if `expect.soft()` failed multiple times or `retry` was triggered.
|
|
148
|
+
*/
|
|
149
|
+
errors?: TestError[];
|
|
150
|
+
/**
|
|
151
|
+
* How long in milliseconds the task took to run.
|
|
152
|
+
*/
|
|
153
|
+
duration?: number;
|
|
154
|
+
/**
|
|
155
|
+
* Time in milliseconds when the task started running.
|
|
156
|
+
*/
|
|
157
|
+
startTime?: number;
|
|
158
|
+
/**
|
|
159
|
+
* Heap size in bytes after the task finished.
|
|
160
|
+
* Only available if `logHeapUsage` option is set and `process.memoryUsage` is defined.
|
|
161
|
+
*/
|
|
162
|
+
heap?: number;
|
|
163
|
+
/**
|
|
164
|
+
* State of related to this task hooks. Useful during reporting.
|
|
165
|
+
*/
|
|
166
|
+
hooks?: Partial<Record<keyof SuiteHooks, TaskState>>;
|
|
167
|
+
/**
|
|
168
|
+
* The amount of times the task was retried. The task is retried only if it
|
|
169
|
+
* failed and `retry` option is set.
|
|
170
|
+
*/
|
|
171
|
+
retryCount?: number;
|
|
172
|
+
/**
|
|
173
|
+
* The amount of times the task was repeated. The task is repeated only if
|
|
174
|
+
* `repeats` option is set. This number also contains `retryCount`.
|
|
175
|
+
*/
|
|
176
|
+
repeatCount?: number;
|
|
177
|
+
}
|
|
178
|
+
/** The time spent importing & executing a non-externalized file. */
|
|
179
|
+
interface ImportDuration {
|
|
180
|
+
/** The time spent importing & executing the file itself, not counting all non-externalized imports that the file does. */
|
|
181
|
+
selfTime: number;
|
|
182
|
+
/** The time spent importing & executing the file and all its imports. */
|
|
183
|
+
totalTime: number;
|
|
184
|
+
/** Will be set to `true`, if the module was externalized. In this case totalTime and selfTime are identical. */
|
|
185
|
+
external?: boolean;
|
|
186
|
+
/** Which module imported this module first. All subsequent imports are cached. */
|
|
187
|
+
importer?: string;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* The tuple representing a single task update.
|
|
191
|
+
* Usually reported after the task finishes.
|
|
192
|
+
*/
|
|
193
|
+
interface Suite extends TaskBase {
|
|
194
|
+
type: "suite";
|
|
195
|
+
/**
|
|
196
|
+
* File task. It's the root task of the file.
|
|
197
|
+
*/
|
|
198
|
+
file: File;
|
|
199
|
+
/**
|
|
200
|
+
* An array of tasks that are part of the suite.
|
|
201
|
+
*/
|
|
202
|
+
tasks: Task[];
|
|
203
|
+
}
|
|
204
|
+
interface File extends Suite {
|
|
205
|
+
/**
|
|
206
|
+
* The name of the pool that the file belongs to.
|
|
207
|
+
* @default 'forks'
|
|
208
|
+
*/
|
|
209
|
+
pool?: string;
|
|
210
|
+
/**
|
|
211
|
+
* The environment that processes the file on the server.
|
|
212
|
+
*/
|
|
213
|
+
viteEnvironment?: string;
|
|
214
|
+
/**
|
|
215
|
+
* The path to the file in UNIX format.
|
|
216
|
+
*/
|
|
217
|
+
filepath: string;
|
|
218
|
+
/**
|
|
219
|
+
* The name of the workspace project the file belongs to.
|
|
220
|
+
*/
|
|
221
|
+
projectName: string | undefined;
|
|
222
|
+
/**
|
|
223
|
+
* The time it took to collect all tests in the file.
|
|
224
|
+
* This time also includes importing all the file dependencies.
|
|
225
|
+
*/
|
|
226
|
+
collectDuration?: number;
|
|
227
|
+
/**
|
|
228
|
+
* The time it took to import the setup file.
|
|
229
|
+
*/
|
|
230
|
+
setupDuration?: number;
|
|
231
|
+
/** The time spent importing every non-externalized dependency that Vitest has processed. */
|
|
232
|
+
importDurations?: Record<string, ImportDuration>;
|
|
233
|
+
}
|
|
234
|
+
interface Test<ExtraContext = object> extends TaskPopulated {
|
|
235
|
+
type: "test";
|
|
236
|
+
/**
|
|
237
|
+
* Test context that will be passed to the test function.
|
|
238
|
+
*/
|
|
239
|
+
context: TestContext & ExtraContext;
|
|
240
|
+
/**
|
|
241
|
+
* The test timeout in milliseconds.
|
|
242
|
+
*/
|
|
243
|
+
timeout: number;
|
|
244
|
+
/**
|
|
245
|
+
* An array of custom annotations.
|
|
246
|
+
*/
|
|
247
|
+
annotations: TestAnnotation[];
|
|
248
|
+
/**
|
|
249
|
+
* An array of artifacts produced by the test.
|
|
250
|
+
*
|
|
251
|
+
* @experimental
|
|
252
|
+
*/
|
|
253
|
+
artifacts: TestArtifact[];
|
|
254
|
+
fullTestName: string;
|
|
255
|
+
}
|
|
256
|
+
type Task = Test | Suite | File;
|
|
257
|
+
/**
|
|
258
|
+
* Retry configuration for tests.
|
|
259
|
+
* Can be a number for simple retry count, or an object for advanced retry control.
|
|
260
|
+
*/
|
|
261
|
+
type Retry = number | {
|
|
262
|
+
/**
|
|
263
|
+
* The number of times to retry the test if it fails.
|
|
264
|
+
* @default 0
|
|
265
|
+
*/
|
|
266
|
+
count?: number;
|
|
267
|
+
/**
|
|
268
|
+
* Delay in milliseconds between retry attempts.
|
|
269
|
+
* @default 0
|
|
270
|
+
*/
|
|
271
|
+
delay?: number;
|
|
272
|
+
/**
|
|
273
|
+
* Condition to determine if a test should be retried based on the error.
|
|
274
|
+
* - If a RegExp, it is tested against the error message
|
|
275
|
+
* - If a function, called with the TestError object; return true to retry
|
|
276
|
+
*
|
|
277
|
+
* NOTE: Functions can only be used in test files, not in vitest.config.ts,
|
|
278
|
+
* because the configuration is serialized when passed to worker threads.
|
|
279
|
+
*
|
|
280
|
+
* @default undefined (retry on all errors)
|
|
281
|
+
*/
|
|
282
|
+
condition?: RegExp | ((error: TestError) => boolean);
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* Serializable retry configuration (used in config files).
|
|
286
|
+
* Functions cannot be serialized, so only string conditions are allowed.
|
|
287
|
+
*/
|
|
288
|
+
interface BeforeEachListener<ExtraContext = object> {
|
|
289
|
+
(context: TestContext & ExtraContext, suite: Readonly<Suite>): Awaitable<unknown>;
|
|
290
|
+
}
|
|
291
|
+
interface AfterEachListener<ExtraContext = object> {
|
|
292
|
+
(context: TestContext & ExtraContext, suite: Readonly<Suite>): Awaitable<unknown>;
|
|
293
|
+
}
|
|
294
|
+
interface AroundEachListener<ExtraContext = object> {
|
|
295
|
+
(runTest: () => Promise<void>, context: TestContext & ExtraContext, suite: Readonly<Suite>): Awaitable<unknown>;
|
|
296
|
+
}
|
|
297
|
+
interface RegisteredAllListener {
|
|
298
|
+
(suite: Readonly<Suite | File>): Awaitable<unknown>;
|
|
299
|
+
}
|
|
300
|
+
interface RegisteredAroundAllListener {
|
|
301
|
+
(runSuite: () => Promise<void>, suite: Readonly<Suite | File>): Awaitable<unknown>;
|
|
302
|
+
}
|
|
303
|
+
interface SuiteHooks<ExtraContext = object> {
|
|
304
|
+
beforeAll: RegisteredAllListener[];
|
|
305
|
+
afterAll: RegisteredAllListener[];
|
|
306
|
+
aroundAll: RegisteredAroundAllListener[];
|
|
307
|
+
beforeEach: BeforeEachListener<ExtraContext>[];
|
|
308
|
+
afterEach: AfterEachListener<ExtraContext>[];
|
|
309
|
+
aroundEach: AroundEachListener<ExtraContext>[];
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* User's custom test context.
|
|
313
|
+
*/
|
|
314
|
+
interface TestContext {
|
|
315
|
+
/**
|
|
316
|
+
* Metadata of the current test
|
|
317
|
+
*/
|
|
318
|
+
readonly task: Readonly<Test>;
|
|
319
|
+
/**
|
|
320
|
+
* An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that will be aborted if the test times out or
|
|
321
|
+
* the test run was cancelled.
|
|
322
|
+
* @see {@link https://vitest.dev/guide/test-context#signal}
|
|
323
|
+
*/
|
|
324
|
+
readonly signal: AbortSignal;
|
|
325
|
+
/**
|
|
326
|
+
* Register a callback to run when this specific test fails.
|
|
327
|
+
* Useful when tests run concurrently.
|
|
328
|
+
* @see {@link https://vitest.dev/guide/test-context#ontestfailed}
|
|
329
|
+
*/
|
|
330
|
+
readonly onTestFailed: (fn: OnTestFailedHandler, timeout?: number) => void;
|
|
331
|
+
/**
|
|
332
|
+
* Register a callback to run when this specific test finishes.
|
|
333
|
+
* Useful when tests run concurrently.
|
|
334
|
+
* @see {@link https://vitest.dev/guide/test-context#ontestfinished}
|
|
335
|
+
*/
|
|
336
|
+
readonly onTestFinished: (fn: OnTestFinishedHandler, timeout?: number) => void;
|
|
337
|
+
/**
|
|
338
|
+
* Mark tests as skipped. All execution after this call will be skipped.
|
|
339
|
+
* This function throws an error, so make sure you are not catching it accidentally.
|
|
340
|
+
* @see {@link https://vitest.dev/guide/test-context#skip}
|
|
341
|
+
*/
|
|
342
|
+
readonly skip: {
|
|
343
|
+
(note?: string): never;
|
|
344
|
+
(condition: boolean, note?: string): void;
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* Add a test annotation that will be displayed by your reporter.
|
|
348
|
+
* @see {@link https://vitest.dev/guide/test-context#annotate}
|
|
349
|
+
*/
|
|
350
|
+
readonly annotate: {
|
|
351
|
+
(message: string, type?: string, attachment?: TestAttachment): Promise<TestAnnotation>;
|
|
352
|
+
(message: string, attachment?: TestAttachment): Promise<TestAnnotation>;
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
type OnTestFailedHandler = (context: TestContext) => Awaitable<void>;
|
|
356
|
+
type OnTestFinishedHandler = (context: TestContext) => Awaitable<void>;
|
|
357
|
+
/**
|
|
358
|
+
* Represents a file or data attachment associated with a test artifact.
|
|
359
|
+
*
|
|
360
|
+
* Attachments can be either file-based (via `path`) or inline content (via `body`).
|
|
361
|
+
* The `contentType` helps consumers understand how to interpret the attachment data.
|
|
362
|
+
*/
|
|
363
|
+
interface TestAttachment {
|
|
364
|
+
/** MIME type of the attachment (e.g., 'image/png', 'text/plain') */
|
|
365
|
+
contentType?: string;
|
|
366
|
+
/** File system path to the attachment */
|
|
367
|
+
path?: string;
|
|
368
|
+
/** Inline attachment content as a string or raw binary data */
|
|
369
|
+
body?: string | Uint8Array;
|
|
370
|
+
}
|
|
371
|
+
interface Location {
|
|
372
|
+
/** Line number in the source file (1-indexed) */
|
|
373
|
+
line: number;
|
|
374
|
+
/** Column number in the line (1-indexed) */
|
|
375
|
+
column: number;
|
|
376
|
+
}
|
|
377
|
+
interface FileLocation extends Location {
|
|
378
|
+
/** Line number in the source file (1-indexed) */
|
|
379
|
+
line: number;
|
|
380
|
+
/** Column number in the line (1-indexed) */
|
|
381
|
+
column: number;
|
|
382
|
+
/** Path to the source file */
|
|
383
|
+
file: string;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Source code location information for a test artifact.
|
|
387
|
+
*
|
|
388
|
+
* Indicates where in the source code the artifact originated from.
|
|
389
|
+
*/
|
|
390
|
+
interface TestArtifactLocation extends FileLocation {}
|
|
391
|
+
/**
|
|
392
|
+
* @experimental
|
|
393
|
+
*
|
|
394
|
+
* Base interface for all test artifacts.
|
|
395
|
+
*
|
|
396
|
+
* Extend this interface when creating custom test artifacts. Vitest automatically manages the `attachments` array and injects the `location` property to indicate where the artifact was created in your test code.
|
|
397
|
+
*
|
|
398
|
+
* **Important**: when running with [`api.allowWrite`](https://vitest.dev/config/api#api-allowwrite) or [`browser.api.allowWrite`](https://vitest.dev/config/browser/api#api-allowwrite) disabled, Vitest empties the `attachments` array on every artifact before reporting it.
|
|
399
|
+
*/
|
|
400
|
+
interface TestArtifactBase {
|
|
401
|
+
/** File or data attachments associated with this artifact */
|
|
402
|
+
attachments?: TestAttachment[];
|
|
403
|
+
/** Source location where this artifact was created */
|
|
404
|
+
location?: TestArtifactLocation;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* @deprecated Use {@linkcode TestArtifactLocation} instead.
|
|
408
|
+
*
|
|
409
|
+
* Kept for backwards compatibility.
|
|
410
|
+
*/
|
|
411
|
+
interface TestAnnotation {
|
|
412
|
+
message: string;
|
|
413
|
+
type: string;
|
|
414
|
+
location?: TestArtifactLocation;
|
|
415
|
+
attachment?: TestAttachment;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* @experimental
|
|
419
|
+
*
|
|
420
|
+
* Artifact type for test annotations.
|
|
421
|
+
*/
|
|
422
|
+
interface TestAnnotationArtifact extends TestArtifactBase {
|
|
423
|
+
type: "internal:annotation";
|
|
424
|
+
annotation: TestAnnotation;
|
|
425
|
+
}
|
|
426
|
+
interface VisualRegressionArtifactAttachment extends TestAttachment {
|
|
427
|
+
name: "reference" | "actual" | "diff";
|
|
428
|
+
width: number;
|
|
429
|
+
height: number;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* @experimental
|
|
433
|
+
*
|
|
434
|
+
* Artifact type for visual regressions.
|
|
435
|
+
*/
|
|
436
|
+
interface VisualRegressionArtifact extends TestArtifactBase {
|
|
437
|
+
type: "internal:toMatchScreenshot";
|
|
438
|
+
kind: "visual-regression";
|
|
439
|
+
message: string;
|
|
440
|
+
attachments: VisualRegressionArtifactAttachment[];
|
|
441
|
+
}
|
|
442
|
+
interface FailureScreenshotArtifactAttachment extends TestAttachment {
|
|
443
|
+
path: string;
|
|
444
|
+
/** Original file system path to the screenshot, before attachment resolution */
|
|
445
|
+
originalPath: string;
|
|
446
|
+
body?: undefined;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* @experimental
|
|
450
|
+
*
|
|
451
|
+
* Artifact type for failure screenshots.
|
|
452
|
+
*/
|
|
453
|
+
interface FailureScreenshotArtifact extends TestArtifactBase {
|
|
454
|
+
type: "internal:failureScreenshot";
|
|
455
|
+
attachments: [FailureScreenshotArtifactAttachment] | [];
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* @experimental
|
|
459
|
+
* @advanced
|
|
460
|
+
*
|
|
461
|
+
* Registry for custom test artifact types.
|
|
462
|
+
*
|
|
463
|
+
* Augment this interface to register custom artifact types that your tests can produce.
|
|
464
|
+
*
|
|
465
|
+
* Each custom artifact should extend {@linkcode TestArtifactBase} and include a unique `type` discriminator property.
|
|
466
|
+
*
|
|
467
|
+
* @remarks
|
|
468
|
+
* - Use a `Symbol` as the **registry key** to guarantee uniqueness
|
|
469
|
+
* - The `type` property should follow the pattern `'package-name:artifact-name'`, `'internal:'` is a reserved prefix
|
|
470
|
+
* - Use `attachments` to include files or data; extend {@linkcode TestAttachment} for custom metadata
|
|
471
|
+
* - `location` property is automatically injected to indicate where the artifact was created
|
|
472
|
+
*
|
|
473
|
+
* @example
|
|
474
|
+
* ```ts
|
|
475
|
+
* // Define custom attachment type for generated PDF
|
|
476
|
+
* interface PDFAttachment extends TestAttachment {
|
|
477
|
+
* contentType: 'application/pdf'
|
|
478
|
+
* body: Uint8Array
|
|
479
|
+
* pageCount: number
|
|
480
|
+
* fileSize: number
|
|
481
|
+
* }
|
|
482
|
+
*
|
|
483
|
+
* interface PDFGenerationArtifact extends TestArtifactBase {
|
|
484
|
+
* type: 'my-plugin:pdf-generation'
|
|
485
|
+
* templateName: string
|
|
486
|
+
* isValid: boolean
|
|
487
|
+
* attachments: [PDFAttachment]
|
|
488
|
+
* }
|
|
489
|
+
*
|
|
490
|
+
* // Use a symbol to guarantee key uniqueness
|
|
491
|
+
* const pdfKey = Symbol('pdf-generation')
|
|
492
|
+
*
|
|
493
|
+
* declare module 'vitest' {
|
|
494
|
+
* interface TestArtifactRegistry {
|
|
495
|
+
* [pdfKey]: PDFGenerationArtifact
|
|
496
|
+
* }
|
|
497
|
+
* }
|
|
498
|
+
*
|
|
499
|
+
* // Custom assertion for PDF generation
|
|
500
|
+
* async function toGenerateValidPDF(
|
|
501
|
+
* this: MatcherState,
|
|
502
|
+
* actual: PDFTemplate,
|
|
503
|
+
* data: Record<string, unknown>
|
|
504
|
+
* ): AsyncExpectationResult {
|
|
505
|
+
* const pdfBuffer = await actual.render(data)
|
|
506
|
+
* const validation = await validatePDF(pdfBuffer)
|
|
507
|
+
*
|
|
508
|
+
* await recordArtifact(this.task, {
|
|
509
|
+
* type: 'my-plugin:pdf-generation',
|
|
510
|
+
* templateName: actual.name,
|
|
511
|
+
* isValid: validation.success,
|
|
512
|
+
* attachments: [{
|
|
513
|
+
* contentType: 'application/pdf',
|
|
514
|
+
* body: pdfBuffer,
|
|
515
|
+
* pageCount: validation.pageCount,
|
|
516
|
+
* fileSize: pdfBuffer.byteLength
|
|
517
|
+
* }]
|
|
518
|
+
* })
|
|
519
|
+
*
|
|
520
|
+
* return {
|
|
521
|
+
* pass: validation.success,
|
|
522
|
+
* message: () => validation.success
|
|
523
|
+
* ? `Generated valid PDF with ${validation.pageCount} pages`
|
|
524
|
+
* : `Invalid PDF: ${validation.error}`
|
|
525
|
+
* }
|
|
526
|
+
* }
|
|
527
|
+
* ```
|
|
528
|
+
*/
|
|
529
|
+
interface TestArtifactRegistry {}
|
|
530
|
+
/**
|
|
531
|
+
* @experimental
|
|
532
|
+
*
|
|
533
|
+
* Union type of all test artifacts, including built-in and custom registered artifacts.
|
|
534
|
+
*
|
|
535
|
+
* This type automatically includes all artifacts registered via {@link TestArtifactRegistry}.
|
|
536
|
+
*/
|
|
537
|
+
type TestArtifact = FailureScreenshotArtifact | TestAnnotationArtifact | VisualRegressionArtifact | TestArtifactRegistry[keyof TestArtifactRegistry];
|
|
538
|
+
//#endregion
|
|
539
|
+
export { File, ImportDuration, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Suite, Task, TaskBase, TaskMeta, TaskResult, TaskState, Test, TestAnnotation, TestAnnotationArtifact, TestArtifact, TestArtifactBase, TestArtifactLocation, TestArtifactRegistry, TestAttachment, TestContext };
|
|
540
|
+
//# sourceMappingURL=tasks.d-D2GKpdwQ.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.d-D2GKpdwQ.d.ts","names":["TestError","Awaitable","DiffOptions","VitestRunnerConfig","RegExp","SequenceHooks","SequenceSetupFiles","SerializableRetry","TestTagDefinition","root","setupFiles","name","passWithNoTests","testNamePattern","allowOnly","sequence","shuffle","concurrent","seed","hooks","chaiConfig","truncateThreshold","maxConcurrency","testTimeout","hookTimeout","retry","includeTaskLocation","diffOptions","tags","tagsFilter","strictTags","FileSpecification","filepath","fileTags","testLocations","testTagsFilter","testIds","TestOptions","TestTags","Omit","description","priority","VitestRunnerImportSource","VitestRunnerConstructor","VitestRunner","config","CancelReason","Record","Artifact","T","File","Test","Suite","Promise","TaskResultPack","TaskEventPack","TestAnnotation","TestArtifact","TestContext","ImportDuration","onBeforeCollect","paths","onCollectStart","file","onCollected","files","cancel","reason","onBeforeRunTask","test","onBeforeTryTask","repeats","options","onTaskFinished","onAfterRunTask","onAfterTryTask","onAfterRetryTask","onBeforeRunSuite","suite","onAfterRunSuite","runSuite","runTask","onTaskUpdate","task","events","onTestAnnotate","annotation","onTestArtifactRecord","artifact","onBeforeRunFiles","onAfterRunFiles","extendTaskContext","context","importFile","source","injectValue","key","getImportDurations","pool","viteEnvironment","onCleanupWorkerContext","cleanup","trace","cb","attributes","_currentTaskStartTime","_currentTaskTimeout","TestFixtureItem","Set","FixtureOptions","value","scope","deps","parent","UserFixtures","FixtureRegistrations","Map","TestFixtures","_suiteContexts","_overrides","_registrations","_definitions","_builtinFixtures","_fixtureOptionKeys","_fixtureScopes","_workerContextSuite","clearDefinitions","getWorkerContexts","getFileContexts","constructor","registrations","extend","runner","userFixtures","get","override","getFileContext","getWorkerContext","parseUserFixtures","beforeAll","ExtraContext","BeforeAllListener","this","fn","timeout","afterAll","AfterAllListener","beforeEach","BeforeEachListener","afterEach","AfterEachListener","onTestFailed","OnTestFailedHandler","TaskHook","onTestFinished","OnTestFinishedHandler","aroundAll","AroundAllListener","aroundEach","AroundEachListener","ChainableFunction","F","C","Parameters","ReturnType","args","x","createChainable","Args","R","keys","RunMode","TaskState","TaskBase","TaskMeta","TaskResult","Retry","Location","id","fullName","fullTestName","mode","meta","each","result","location","dynamic","TaskPopulated","fails","promises","SuiteHooks","Partial","state","errors","duration","startTime","heap","retryCount","repeatCount","selfTime","totalTime","external","importer","TaskEventData","TaskUpdateEvent","event","data","Task","type","tasks","projectName","collectDuration","setupDuration","importDurations","annotations","artifacts","TestFunction","ExtractEachCallbackArgs","ReadonlyArray","Array","Readonly","fallback","U","EachFunctionReturn","Function","TestCollectorOptions","TestEachFunction","TemplateStringsArray","cases","TestForFunctionReturn","Arg","Context","arg","TestForFunction","strings","values","SuiteForFunction","TestCollectorCallable","ChainableTestAPI","for","count","delay","condition","error","sequential","skip","only","todo","SuiteOptions","ExtendedAPI","skipIf","runIf","Hooks","ExtractSuiteContext","TestAPI","K","WorkerScopeFixtureOptions","WorkerScopeContext","BuilderFixtureFn","AddBuilderWorker","FileScopeFixtureOptions","FileScopeContext","AddBuilderFile","TestScopeFixtureOptions","TestScopeContext","AddBuilderTest","ScopedFixturesDef","ScopedFixturesObject","ExtractScopedFixtures","Fixtures","SuiteAPI","fixtures","scoped","describe","auto","injected","Use","OnCleanup","onCleanup","fixture","ExtractBuilderWorker","ExtractBuilderFile","$__worker","$__file","$__test","W","ExtractBuilderTest","V","FixtureFn","use","Fixture","Exclude","ScopedFixtureFn","Value","$test","$file","$worker","NonNullable","InferFixturesTypes","SuiteCollectorCallable","OverrideExtraContext","SuiteFactory","SuiteCollector","ChainableSuiteAPI","runTest","RegisteredAllListener","RegisteredAroundAllListener","TaskCustomOptions","handler","collect","clear","on","RuntimeContext","currentSuite","AbortSignal","TestAttachment","signal","note","annotate","message","attachment","HookListener","Uint8Array","contentType","path","body","line","column","FileLocation","TestArtifactLocation","TestArtifactBase","attachments","TestAnnotationLocation","TestAnnotationArtifact","VisualRegressionArtifactAttachment","width","height","VisualRegressionArtifact","kind","FailureScreenshotArtifactAttachment","originalPath","FailureScreenshotArtifact","TestArtifactRegistry","a8","a9","aa","ab","ac","ad","ae","af","ah","$","A","B","D","E","G","H","I","J","L","M","N","O","P","Q","S","X","Y","Z","_","a","a0","a1","a2","a3","a4","a5","a6","a7","ag","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","y","z"],"sources":["../../../../../../../node_modules/@vitest/runner/dist/tasks.d-D2GKpdwQ.d.ts"],"x_google_ignoreList":[0],"mappings":";;;KA4ZK2K,OAAAA;AAAAA,KACAC,SAAAA,GAAYD,OAAAA;AAAAA,UACPE,QAAAA;EA26ByC;AAAA;;;;;EAp6BlDK,EAAAA;;;;EAIAvK,IAAAA;EAq7BiD;;;;;;;;;;;;AAKtB;;;;EAz6B3BwK,QAAAA;;;;;;AAk7B0B;;;;;;;;;;AAKpB;EAt6BNC,YAAAA;;;;;;;;;EASAC,IAAAA,EAAMV,OAAAA;EAw6ByC;AAAA;;EAp6B/CW,IAAAA,EAAMR,QAAAA;EAs6B6D;;;EAl6BnES,IAAAA;;;;EAIAtK,UAAAA;EAy6BkC;;;EAr6BlCD,OAAAA;;;;EAIA8D,KAAAA,GAAQ1B,KAAAA;EAm6ByC;AAAA;;;EA95BjDoI,MAAAA,GAAST,UAAAA;EAw+BoB;AAAA;;;;;EAj+B7BtJ,KAAAA,GAAQuJ,KAAAA;;;;;;EAMRzG,OAAAA;;;;;;EAMAkH,QAAAA,GAAWR,QAAAA;;;;;;EAMXS,OAAAA;;;;EAIA9J,IAAAA;AAAAA;AAAAA,UAES+J,aAAAA,SAAsBd,QAAAA;;;;EAI/B9G,IAAAA,EAAMb,IAAAA;;;;EAIN0I,KAAAA;;;;EAIAC,QAAAA,GAAWxI,OAAAA;AAAAA;;;;UAKFyH,QAAAA;;;;UAIAC,UAAAA;;;;;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;AAAAA;;;;;;UAOSgB,yBAAAA,SAAkCX,gBAAAA;EAC3C1H,IAAAA;EACA2H,WAAAA,GAAcQ,mCAAAA;AAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA0ELG,oBAAAA;;;;;;;;KAQL7R,YAAAA,GAAe4R,yBAAAA,GAA4BR,sBAAAA,GAAyBI,wBAAAA,GAA2BK,oBAAAA,OAA2BA,oBAAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./chunk-tasks.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ParsedStack } from "../../utils/dist/types.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts
|
|
4
|
+
interface SnapshotEnvironment {
|
|
5
|
+
getVersion: () => string;
|
|
6
|
+
getHeader: () => string;
|
|
7
|
+
resolvePath: (filepath: string) => Promise<string>;
|
|
8
|
+
resolveRawPath: (testPath: string, rawPath: string) => Promise<string>;
|
|
9
|
+
saveSnapshotFile: (filepath: string, snapshot: string) => Promise<void>;
|
|
10
|
+
readSnapshotFile: (filepath: string) => Promise<string | null>;
|
|
11
|
+
removeSnapshotFile: (filepath: string) => Promise<void>;
|
|
12
|
+
processStackTrace?: (stack: ParsedStack) => ParsedStack;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SnapshotEnvironment };
|
|
16
|
+
//# sourceMappingURL=environment.d-DOJxxZV9.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d-DOJxxZV9.d.ts","names":["ParsedStack","SnapshotEnvironment","Promise","getVersion","getHeader","resolvePath","filepath","resolveRawPath","testPath","rawPath","saveSnapshotFile","snapshot","readSnapshotFile","removeSnapshotFile","processStackTrace","stack","SnapshotEnvironmentOptions","snapshotsDirName","S","a"],"sources":["../../../../../../../node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts"],"x_google_ignoreList":[0],"mappings":";;;UAEUC,mBAAAA;EACTE,UAAAA;EACAC,SAAAA;EACAC,WAAAA,GAAcC,QAAAA,aAAqBJ,OAAAA;EACnCK,cAAAA,GAAiBC,QAAAA,UAAkBC,OAAAA,aAAoBP,OAAAA;EACvDQ,gBAAAA,GAAmBJ,QAAAA,UAAkBK,QAAAA,aAAqBT,OAAAA;EAC1DU,gBAAAA,GAAmBN,QAAAA,aAAqBJ,OAAAA;EACxCW,kBAAAA,GAAqBP,QAAAA,aAAqBJ,OAAAA;EAC1CY,iBAAAA,IAAqBC,KAAAA,EAAOf,WAAAA,KAAgBA,WAAAA;AAAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ParsedStack } from "../../utils/dist/types.js";
|
|
2
|
+
import { SnapshotEnvironment } from "./environment.d-DOJxxZV9.js";
|
|
3
|
+
import { SnapshotMatchOptions, SnapshotResult, SnapshotStateOptions, SnapshotUpdateState } from "./rawSnapshot.d-U2kJUxDr.js";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/@vitest/snapshot/dist/index.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
declare class DefaultMap<K, V> extends Map<K, V> {
|
|
13
|
+
private defaultFn;
|
|
14
|
+
constructor(defaultFn: (key: K) => V, entries?: Iterable<readonly [K, V]>);
|
|
15
|
+
get(key: K): V;
|
|
16
|
+
}
|
|
17
|
+
declare class CounterMap<K> extends DefaultMap<K, number> {
|
|
18
|
+
constructor();
|
|
19
|
+
_total: number | undefined;
|
|
20
|
+
valueOf(): number;
|
|
21
|
+
increment(key: K): void;
|
|
22
|
+
total(): number;
|
|
23
|
+
}
|
|
24
|
+
interface SnapshotReturnOptions {
|
|
25
|
+
actual: string;
|
|
26
|
+
count: number;
|
|
27
|
+
expected?: string;
|
|
28
|
+
key: string;
|
|
29
|
+
pass: boolean;
|
|
30
|
+
}
|
|
31
|
+
interface SaveStatus {
|
|
32
|
+
deleted: boolean;
|
|
33
|
+
saved: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare class SnapshotState {
|
|
36
|
+
testFilePath: string;
|
|
37
|
+
snapshotPath: string;
|
|
38
|
+
private _counters;
|
|
39
|
+
private _dirty;
|
|
40
|
+
private _updateSnapshot;
|
|
41
|
+
private _snapshotData;
|
|
42
|
+
private _initialData;
|
|
43
|
+
private _inlineSnapshots;
|
|
44
|
+
private _inlineSnapshotStacks;
|
|
45
|
+
private _testIdToKeys;
|
|
46
|
+
private _rawSnapshots;
|
|
47
|
+
private _uncheckedKeys;
|
|
48
|
+
private _snapshotFormat;
|
|
49
|
+
private _environment;
|
|
50
|
+
private _fileExists;
|
|
51
|
+
expand: boolean;
|
|
52
|
+
private _added;
|
|
53
|
+
private _matched;
|
|
54
|
+
private _unmatched;
|
|
55
|
+
private _updated;
|
|
56
|
+
get added(): CounterMap<string>;
|
|
57
|
+
set added(value: number);
|
|
58
|
+
get matched(): CounterMap<string>;
|
|
59
|
+
set matched(value: number);
|
|
60
|
+
get unmatched(): CounterMap<string>;
|
|
61
|
+
set unmatched(value: number);
|
|
62
|
+
get updated(): CounterMap<string>;
|
|
63
|
+
set updated(value: number);
|
|
64
|
+
private constructor();
|
|
65
|
+
static create(testFilePath: string, options: SnapshotStateOptions): Promise<SnapshotState>;
|
|
66
|
+
get environment(): SnapshotEnvironment;
|
|
67
|
+
markSnapshotsAsCheckedForTest(testName: string): void;
|
|
68
|
+
clearTest(testId: string): void;
|
|
69
|
+
protected _inferInlineSnapshotStack(stacks: ParsedStack[]): ParsedStack | null;
|
|
70
|
+
private _addSnapshot;
|
|
71
|
+
save(): Promise<SaveStatus>;
|
|
72
|
+
getUncheckedCount(): number;
|
|
73
|
+
getUncheckedKeys(): Array<string>;
|
|
74
|
+
removeUncheckedKeys(): void;
|
|
75
|
+
match({
|
|
76
|
+
testId,
|
|
77
|
+
testName,
|
|
78
|
+
received,
|
|
79
|
+
key,
|
|
80
|
+
inlineSnapshot,
|
|
81
|
+
isInline,
|
|
82
|
+
error,
|
|
83
|
+
rawSnapshot
|
|
84
|
+
}: SnapshotMatchOptions): SnapshotReturnOptions;
|
|
85
|
+
pack(): Promise<SnapshotResult>;
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { SnapshotState };
|
|
89
|
+
//# sourceMappingURL=index.d.ts.map
|