@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.
Files changed (237) hide show
  1. package/dist/__test-utils__/callTool.d.ts +29 -0
  2. package/dist/__test-utils__/callTool.d.ts.map +1 -0
  3. package/dist/__test-utils__/callTool.js +45 -0
  4. package/dist/__test-utils__/callTool.js.map +1 -0
  5. package/dist/__test-utils__/mocks.d.ts +125 -0
  6. package/dist/__test-utils__/mocks.d.ts.map +1 -0
  7. package/dist/__test-utils__/mocks.js +146 -0
  8. package/dist/__test-utils__/mocks.js.map +1 -0
  9. package/dist/client.d.ts +67 -0
  10. package/dist/client.d.ts.map +1 -0
  11. package/dist/client.js +209 -0
  12. package/dist/client.js.map +1 -0
  13. package/dist/config.d.ts +30 -0
  14. package/dist/config.d.ts.map +1 -0
  15. package/dist/config.js +127 -0
  16. package/dist/config.js.map +1 -0
  17. package/dist/cosmos.d.ts +24 -0
  18. package/dist/cosmos.d.ts.map +1 -0
  19. package/dist/cosmos.js +85 -0
  20. package/dist/cosmos.js.map +1 -0
  21. package/dist/index.d.ts +19 -0
  22. package/dist/index.js +20 -0
  23. package/dist/lcd-adapter.d.ts +15 -0
  24. package/dist/lcd-adapter.d.ts.map +1 -0
  25. package/dist/lcd-adapter.js +98 -0
  26. package/dist/lcd-adapter.js.map +1 -0
  27. package/dist/logger.d.ts +20 -0
  28. package/dist/logger.d.ts.map +1 -0
  29. package/dist/logger.js +43 -0
  30. package/dist/logger.js.map +1 -0
  31. package/dist/modules.d.ts +63 -0
  32. package/dist/modules.d.ts.map +1 -0
  33. package/dist/modules.js +759 -0
  34. package/dist/modules.js.map +1 -0
  35. package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +78 -0
  36. package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js.map +1 -0
  37. package/dist/node_modules/@vitest/expect/dist/index.d.ts +802 -0
  38. package/dist/node_modules/@vitest/expect/dist/index.d.ts.map +1 -0
  39. package/dist/node_modules/@vitest/expect/dist/index.js +1457 -0
  40. package/dist/node_modules/@vitest/expect/dist/index.js.map +1 -0
  41. package/dist/node_modules/@vitest/pretty-format/dist/index.d.ts +95 -0
  42. package/dist/node_modules/@vitest/pretty-format/dist/index.d.ts.map +1 -0
  43. package/dist/node_modules/@vitest/pretty-format/dist/index.js +877 -0
  44. package/dist/node_modules/@vitest/pretty-format/dist/index.js.map +1 -0
  45. package/dist/node_modules/@vitest/runner/dist/chunk-tasks.js +91 -0
  46. package/dist/node_modules/@vitest/runner/dist/chunk-tasks.js.map +1 -0
  47. package/dist/node_modules/@vitest/runner/dist/index.js +1381 -0
  48. package/dist/node_modules/@vitest/runner/dist/index.js.map +1 -0
  49. package/dist/node_modules/@vitest/runner/dist/tasks.d-D2GKpdwQ.d.ts +540 -0
  50. package/dist/node_modules/@vitest/runner/dist/tasks.d-D2GKpdwQ.d.ts.map +1 -0
  51. package/dist/node_modules/@vitest/runner/dist/utils.js +1 -0
  52. package/dist/node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts +16 -0
  53. package/dist/node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts.map +1 -0
  54. package/dist/node_modules/@vitest/snapshot/dist/index.d.ts +89 -0
  55. package/dist/node_modules/@vitest/snapshot/dist/index.d.ts.map +1 -0
  56. package/dist/node_modules/@vitest/snapshot/dist/index.js +649 -0
  57. package/dist/node_modules/@vitest/snapshot/dist/index.js.map +1 -0
  58. package/dist/node_modules/@vitest/snapshot/dist/rawSnapshot.d-U2kJUxDr.d.ts +40 -0
  59. package/dist/node_modules/@vitest/snapshot/dist/rawSnapshot.d-U2kJUxDr.d.ts.map +1 -0
  60. package/dist/node_modules/@vitest/spy/dist/index.d.ts +343 -0
  61. package/dist/node_modules/@vitest/spy/dist/index.d.ts.map +1 -0
  62. package/dist/node_modules/@vitest/spy/dist/index.js +386 -0
  63. package/dist/node_modules/@vitest/spy/dist/index.js.map +1 -0
  64. package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +82 -0
  65. package/dist/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js.map +1 -0
  66. package/dist/node_modules/@vitest/utils/dist/diff.d.ts +14 -0
  67. package/dist/node_modules/@vitest/utils/dist/diff.d.ts.map +1 -0
  68. package/dist/node_modules/@vitest/utils/dist/diff.js +1297 -0
  69. package/dist/node_modules/@vitest/utils/dist/diff.js.map +1 -0
  70. package/dist/node_modules/@vitest/utils/dist/display.d.ts +15 -0
  71. package/dist/node_modules/@vitest/utils/dist/display.d.ts.map +1 -0
  72. package/dist/node_modules/@vitest/utils/dist/display.js +558 -0
  73. package/dist/node_modules/@vitest/utils/dist/display.js.map +1 -0
  74. package/dist/node_modules/@vitest/utils/dist/error.js +30 -0
  75. package/dist/node_modules/@vitest/utils/dist/error.js.map +1 -0
  76. package/dist/node_modules/@vitest/utils/dist/helpers.js +181 -0
  77. package/dist/node_modules/@vitest/utils/dist/helpers.js.map +1 -0
  78. package/dist/node_modules/@vitest/utils/dist/offset.js +27 -0
  79. package/dist/node_modules/@vitest/utils/dist/offset.js.map +1 -0
  80. package/dist/node_modules/@vitest/utils/dist/serialize.js +77 -0
  81. package/dist/node_modules/@vitest/utils/dist/serialize.js.map +1 -0
  82. package/dist/node_modules/@vitest/utils/dist/source-map.js +367 -0
  83. package/dist/node_modules/@vitest/utils/dist/source-map.js.map +1 -0
  84. package/dist/node_modules/@vitest/utils/dist/timers.js +37 -0
  85. package/dist/node_modules/@vitest/utils/dist/timers.js.map +1 -0
  86. package/dist/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts +38 -0
  87. package/dist/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts.map +1 -0
  88. package/dist/node_modules/@vitest/utils/dist/types.d.ts +25 -0
  89. package/dist/node_modules/@vitest/utils/dist/types.d.ts.map +1 -0
  90. package/dist/node_modules/chai/index.js +2875 -0
  91. package/dist/node_modules/chai/index.js.map +1 -0
  92. package/dist/node_modules/magic-string/dist/magic-string.es.js +939 -0
  93. package/dist/node_modules/magic-string/dist/magic-string.es.js.map +1 -0
  94. package/dist/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +85 -0
  95. package/dist/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js.map +1 -0
  96. package/dist/node_modules/tinybench/dist/index.d.ts +91 -0
  97. package/dist/node_modules/tinybench/dist/index.d.ts.map +1 -0
  98. package/dist/node_modules/tinyrainbow/dist/index.d.ts +9 -0
  99. package/dist/node_modules/tinyrainbow/dist/index.d.ts.map +1 -0
  100. package/dist/node_modules/tinyrainbow/dist/index.js +86 -0
  101. package/dist/node_modules/tinyrainbow/dist/index.js.map +1 -0
  102. package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +6 -0
  103. package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js.map +1 -0
  104. package/dist/node_modules/vitest/dist/chunks/benchmark.D0SlKNbZ.js +41 -0
  105. package/dist/node_modules/vitest/dist/chunks/benchmark.D0SlKNbZ.js.map +1 -0
  106. package/dist/node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts +12 -0
  107. package/dist/node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts.map +1 -0
  108. package/dist/node_modules/vitest/dist/chunks/global.d.x-ILCfAE.d.ts +100 -0
  109. package/dist/node_modules/vitest/dist/chunks/global.d.x-ILCfAE.d.ts.map +1 -0
  110. package/dist/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js +57 -0
  111. package/dist/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js.map +1 -0
  112. package/dist/node_modules/vitest/dist/chunks/rpc.d.BFMWpdph.d.ts +13 -0
  113. package/dist/node_modules/vitest/dist/chunks/rpc.d.BFMWpdph.d.ts.map +1 -0
  114. package/dist/node_modules/vitest/dist/chunks/test.CTcmp4Su.js +2791 -0
  115. package/dist/node_modules/vitest/dist/chunks/test.CTcmp4Su.js.map +1 -0
  116. package/dist/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js +44 -0
  117. package/dist/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js.map +1 -0
  118. package/dist/node_modules/vitest/dist/index.d.ts +9 -0
  119. package/dist/queries/auth.d.ts +15 -0
  120. package/dist/queries/auth.d.ts.map +1 -0
  121. package/dist/queries/auth.js +58 -0
  122. package/dist/queries/auth.js.map +1 -0
  123. package/dist/queries/bank.d.ts +15 -0
  124. package/dist/queries/bank.d.ts.map +1 -0
  125. package/dist/queries/bank.js +93 -0
  126. package/dist/queries/bank.js.map +1 -0
  127. package/dist/queries/billing.d.ts +15 -0
  128. package/dist/queries/billing.d.ts.map +1 -0
  129. package/dist/queries/billing.js +114 -0
  130. package/dist/queries/billing.js.map +1 -0
  131. package/dist/queries/distribution.d.ts +15 -0
  132. package/dist/queries/distribution.d.ts.map +1 -0
  133. package/dist/queries/distribution.js +73 -0
  134. package/dist/queries/distribution.js.map +1 -0
  135. package/dist/queries/gov.d.ts +15 -0
  136. package/dist/queries/gov.d.ts.map +1 -0
  137. package/dist/queries/gov.js +98 -0
  138. package/dist/queries/gov.js.map +1 -0
  139. package/dist/queries/group.d.ts +15 -0
  140. package/dist/queries/group.d.ts.map +1 -0
  141. package/dist/queries/group.js +159 -0
  142. package/dist/queries/group.js.map +1 -0
  143. package/dist/queries/index.d.ts +10 -0
  144. package/dist/queries/index.js +10 -0
  145. package/dist/queries/sku.d.ts +16 -0
  146. package/dist/queries/sku.d.ts.map +1 -0
  147. package/dist/queries/sku.js +85 -0
  148. package/dist/queries/sku.js.map +1 -0
  149. package/dist/queries/staking.d.ts +15 -0
  150. package/dist/queries/staking.d.ts.map +1 -0
  151. package/dist/queries/staking.js +127 -0
  152. package/dist/queries/staking.js.map +1 -0
  153. package/dist/queries/utils.d.ts +54 -0
  154. package/dist/queries/utils.d.ts.map +1 -0
  155. package/dist/queries/utils.js +74 -0
  156. package/dist/queries/utils.js.map +1 -0
  157. package/dist/retry.d.ts +48 -0
  158. package/dist/retry.d.ts.map +1 -0
  159. package/dist/retry.js +106 -0
  160. package/dist/retry.js.map +1 -0
  161. package/dist/server-utils.d.ts +61 -0
  162. package/dist/server-utils.d.ts.map +1 -0
  163. package/dist/server-utils.js +156 -0
  164. package/dist/server-utils.js.map +1 -0
  165. package/dist/tools/fundCredits.d.ts +8 -0
  166. package/dist/tools/fundCredits.d.ts.map +1 -0
  167. package/dist/tools/fundCredits.js +9 -0
  168. package/dist/tools/fundCredits.js.map +1 -0
  169. package/dist/tools/getBalance.d.ts +26 -0
  170. package/dist/tools/getBalance.d.ts.map +1 -0
  171. package/dist/tools/getBalance.js +59 -0
  172. package/dist/tools/getBalance.js.map +1 -0
  173. package/dist/tools/stopApp.d.ts +13 -0
  174. package/dist/tools/stopApp.d.ts.map +1 -0
  175. package/dist/tools/stopApp.js +15 -0
  176. package/dist/tools/stopApp.js.map +1 -0
  177. package/dist/transactions/bank.d.ts +11 -0
  178. package/dist/transactions/bank.d.ts.map +1 -0
  179. package/dist/transactions/bank.js +75 -0
  180. package/dist/transactions/bank.js.map +1 -0
  181. package/dist/transactions/billing.d.ts +11 -0
  182. package/dist/transactions/billing.d.ts.map +1 -0
  183. package/dist/transactions/billing.js +189 -0
  184. package/dist/transactions/billing.js.map +1 -0
  185. package/dist/transactions/distribution.d.ts +11 -0
  186. package/dist/transactions/distribution.d.ts.map +1 -0
  187. package/dist/transactions/distribution.js +60 -0
  188. package/dist/transactions/distribution.js.map +1 -0
  189. package/dist/transactions/gov.d.ts +11 -0
  190. package/dist/transactions/gov.d.ts.map +1 -0
  191. package/dist/transactions/gov.js +108 -0
  192. package/dist/transactions/gov.js.map +1 -0
  193. package/dist/transactions/group.d.ts +11 -0
  194. package/dist/transactions/group.d.ts.map +1 -0
  195. package/dist/transactions/group.js +347 -0
  196. package/dist/transactions/group.js.map +1 -0
  197. package/dist/transactions/index.d.ts +10 -0
  198. package/dist/transactions/index.js +10 -0
  199. package/dist/transactions/manifest.d.ts +11 -0
  200. package/dist/transactions/manifest.d.ts.map +1 -0
  201. package/dist/transactions/manifest.js +59 -0
  202. package/dist/transactions/manifest.js.map +1 -0
  203. package/dist/transactions/sku.d.ts +11 -0
  204. package/dist/transactions/sku.d.ts.map +1 -0
  205. package/dist/transactions/sku.js +191 -0
  206. package/dist/transactions/sku.js.map +1 -0
  207. package/dist/transactions/staking.d.ts +11 -0
  208. package/dist/transactions/staking.d.ts.map +1 -0
  209. package/dist/transactions/staking.js +79 -0
  210. package/dist/transactions/staking.js.map +1 -0
  211. package/dist/transactions/utils.d.ts +161 -0
  212. package/dist/transactions/utils.d.ts.map +1 -0
  213. package/dist/transactions/utils.js +272 -0
  214. package/dist/transactions/utils.js.map +1 -0
  215. package/dist/types.d.ts +390 -0
  216. package/dist/types.d.ts.map +1 -0
  217. package/dist/types.js +45 -0
  218. package/dist/types.js.map +1 -0
  219. package/dist/validation.d.ts +30 -0
  220. package/dist/validation.d.ts.map +1 -0
  221. package/dist/validation.js +53 -0
  222. package/dist/validation.js.map +1 -0
  223. package/dist/version.d.ts +5 -0
  224. package/dist/version.d.ts.map +1 -0
  225. package/dist/version.js +6 -0
  226. package/dist/version.js.map +1 -0
  227. package/dist/wallet/index.d.ts +4 -0
  228. package/dist/wallet/index.js +3 -0
  229. package/dist/wallet/mnemonic.d.ts +47 -0
  230. package/dist/wallet/mnemonic.d.ts.map +1 -0
  231. package/dist/wallet/mnemonic.js +97 -0
  232. package/dist/wallet/mnemonic.js.map +1 -0
  233. package/dist/wallet/sign-arbitrary.d.ts +12 -0
  234. package/dist/wallet/sign-arbitrary.d.ts.map +1 -0
  235. package/dist/wallet/sign-arbitrary.js +36 -0
  236. package/dist/wallet/sign-arbitrary.js.map +1 -0
  237. package/package.json +72 -0
@@ -0,0 +1,802 @@
1
+ import { MockInstance } from "../../spy/dist/index.js";
2
+ import { stringify } from "../../utils/dist/display.js";
3
+ import { DiffOptions } from "../../utils/dist/types.d-BCElaP-c.js";
4
+ import { diff, printDiffOrStringify } from "../../utils/dist/diff.js";
5
+ import { Test } from "../../runner/dist/tasks.d-D2GKpdwQ.js";
6
+ import { Formatter } from "../../../tinyrainbow/dist/index.js";
7
+
8
+ //#region ../../node_modules/@vitest/expect/dist/index.d.ts
9
+ interface AsymmetricMatcherInterface {
10
+ asymmetricMatch: (other: unknown, customTesters?: Array<Tester>) => boolean;
11
+ toString: () => string;
12
+ getExpectedType?: () => string;
13
+ toAsymmetricMatcher?: () => string;
14
+ }
15
+ declare abstract class AsymmetricMatcher<T, State extends MatcherState = MatcherState> implements AsymmetricMatcherInterface {
16
+ protected sample: T;
17
+ protected inverse: boolean;
18
+ $$typeof: symbol;
19
+ constructor(sample: T, inverse?: boolean);
20
+ protected getMatcherContext(expect?: Chai.ExpectStatic): State;
21
+ abstract asymmetricMatch(other: unknown, customTesters?: Array<Tester>): boolean;
22
+ abstract toString(): string;
23
+ getExpectedType?(): string;
24
+ toAsymmetricMatcher?(): string;
25
+ }
26
+ declare function matcherHint(matcherName: string, received?: string, expected?: string, options?: MatcherHintOptions): string;
27
+ declare function printReceived(object: unknown): string;
28
+ declare function printExpected(value: unknown): string;
29
+ declare function getMatcherUtils(): {
30
+ EXPECTED_COLOR: Formatter;
31
+ RECEIVED_COLOR: Formatter;
32
+ INVERTED_COLOR: Formatter;
33
+ BOLD_WEIGHT: Formatter;
34
+ DIM_COLOR: Formatter;
35
+ diff: typeof diff;
36
+ matcherHint: typeof matcherHint;
37
+ printReceived: typeof printReceived;
38
+ printExpected: typeof printExpected;
39
+ printDiffOrStringify: typeof printDiffOrStringify;
40
+ printWithType: typeof printWithType;
41
+ };
42
+ declare function printWithType<T>(name: string, value: T, print: (value: T) => string): string;
43
+ type Tester = (this: TesterContext, a: any, b: any, customTesters: Array<Tester>) => boolean | undefined;
44
+ interface TesterContext {
45
+ equals: (a: unknown, b: unknown, customTesters?: Array<Tester>, strictCheck?: boolean) => boolean;
46
+ }
47
+ interface MatcherHintOptions {
48
+ comment?: string;
49
+ expectedColor?: Formatter;
50
+ isDirectExpectCall?: boolean;
51
+ isNot?: boolean;
52
+ promise?: string;
53
+ receivedColor?: Formatter;
54
+ secondArgument?: string;
55
+ secondArgumentColor?: Formatter;
56
+ }
57
+ interface MatcherState {
58
+ customTesters: Array<Tester>;
59
+ assertionCalls: number;
60
+ currentTestName?: string;
61
+ /**
62
+ * @deprecated exists only in types
63
+ */
64
+ dontThrow?: () => void;
65
+ /**
66
+ * @deprecated exists only in types
67
+ */
68
+ error?: Error;
69
+ equals: (a: unknown, b: unknown, customTesters?: Array<Tester>, strictCheck?: boolean) => boolean;
70
+ /**
71
+ * @deprecated exists only in types
72
+ */
73
+ expand?: boolean;
74
+ expectedAssertionsNumber?: number | null;
75
+ expectedAssertionsNumberErrorGen?: (() => Error) | null;
76
+ isExpectingAssertions?: boolean;
77
+ isExpectingAssertionsError?: Error | null;
78
+ isNot: boolean;
79
+ promise: string;
80
+ /**
81
+ * @deprecated exists only in types
82
+ */
83
+ suppressedErrors: Array<Error>;
84
+ testPath?: string;
85
+ utils: ReturnType<typeof getMatcherUtils> & {
86
+ diff: typeof diff;
87
+ stringify: typeof stringify;
88
+ iterableEquality: Tester;
89
+ subsetEquality: Tester;
90
+ };
91
+ soft?: boolean;
92
+ poll?: boolean;
93
+ task?: Readonly<Test>;
94
+ }
95
+ interface SyncExpectationResult {
96
+ pass: boolean;
97
+ message: () => string;
98
+ actual?: any;
99
+ expected?: any;
100
+ }
101
+ type AsyncExpectationResult = Promise<SyncExpectationResult>;
102
+ type ExpectationResult = SyncExpectationResult | AsyncExpectationResult;
103
+ interface RawMatcherFn<T extends MatcherState = MatcherState, E extends Array<any> = Array<any>> {
104
+ (this: T, received: any, ...expected: E): ExpectationResult;
105
+ }
106
+ interface Matchers<T = any> {}
107
+ type MatchersObject<T extends MatcherState = MatcherState> = Record<string, RawMatcherFn<T>> & ThisType<T> & { [K in keyof Matchers<T>]?: RawMatcherFn<T, Parameters<Matchers<T>[K]>> };
108
+ interface ExpectStatic extends Chai.ExpectStatic, Matchers, AsymmetricMatchersContaining {
109
+ <T>(actual: T, message?: string): Assertion<T>;
110
+ extend: (expects: MatchersObject) => void;
111
+ anything: () => any;
112
+ any: (constructor: unknown) => any;
113
+ getState: () => MatcherState;
114
+ setState: (state: Partial<MatcherState>) => void;
115
+ not: AsymmetricMatchersContaining;
116
+ }
117
+ interface CustomMatcher {
118
+ /**
119
+ * Checks that a value satisfies a custom matcher function.
120
+ *
121
+ * @param matcher - A function returning a boolean based on the custom condition
122
+ * @param message - Optional custom error message on failure
123
+ *
124
+ * @example
125
+ * expect(age).toSatisfy(val => val >= 18, 'Age must be at least 18');
126
+ * expect(age).toEqual(expect.toSatisfy(val => val >= 18, 'Age must be at least 18'));
127
+ */
128
+ toSatisfy: (matcher: (value: any) => boolean, message?: string) => any;
129
+ /**
130
+ * Matches if the received value is one of the values in the expected array or set.
131
+ *
132
+ * @example
133
+ * expect(1).toBeOneOf([1, 2, 3])
134
+ * expect('foo').toBeOneOf([expect.any(String)])
135
+ * expect({ a: 1 }).toEqual({ a: expect.toBeOneOf(['1', '2', '3']) })
136
+ */
137
+ toBeOneOf: <T>(sample: Array<T> | Set<T>) => any;
138
+ }
139
+ interface AsymmetricMatchersContaining extends CustomMatcher {
140
+ /**
141
+ * Matches if the received string contains the expected substring.
142
+ *
143
+ * @example
144
+ * expect('I have an apple').toEqual(expect.stringContaining('apple'));
145
+ * expect({ a: 'test string' }).toEqual({ a: expect.stringContaining('test') });
146
+ */
147
+ stringContaining: (expected: string) => any;
148
+ /**
149
+ * Matches if the received object contains all properties of the expected object.
150
+ *
151
+ * @example
152
+ * expect({ a: '1', b: 2 }).toEqual(expect.objectContaining({ a: '1' }))
153
+ */
154
+ objectContaining: <T = any>(expected: DeeplyAllowMatchers<T>) => any;
155
+ /**
156
+ * Matches if the received array contains all elements in the expected array.
157
+ *
158
+ * @example
159
+ * expect(['a', 'b', 'c']).toEqual(expect.arrayContaining(['b', 'a']));
160
+ */
161
+ arrayContaining: <T = unknown>(expected: Array<DeeplyAllowMatchers<T>>) => any;
162
+ /**
163
+ * Matches if the received string or regex matches the expected pattern.
164
+ *
165
+ * @example
166
+ * expect('hello world').toEqual(expect.stringMatching(/^hello/));
167
+ * expect('hello world').toEqual(expect.stringMatching('hello'));
168
+ */
169
+ stringMatching: (expected: string | RegExp) => any;
170
+ /**
171
+ * Matches if the received number is within a certain precision of the expected number.
172
+ *
173
+ * @example
174
+ * expect(10.45).toEqual(expect.closeTo(10.5, 1));
175
+ * expect(5.11).toEqual(expect.closeTo(5.12)); // with default precision
176
+ */
177
+ closeTo: (expected: number, precision?: number) => any;
178
+ /**
179
+ * Matches if the received value validates against a Standard Schema.
180
+ *
181
+ * @param schema - A Standard Schema V1 compatible schema object
182
+ *
183
+ * @example
184
+ * expect(user).toEqual(expect.schemaMatching(z.object({ name: z.string() })))
185
+ * expect(['hello', 'world']).toEqual([expect.schemaMatching(z.string()), expect.schemaMatching(z.string())])
186
+ */
187
+ schemaMatching: (schema: unknown) => any;
188
+ }
189
+ type WithAsymmetricMatcher<T> = T | AsymmetricMatcher<unknown>;
190
+ type DeeplyAllowMatchers<T> = T extends Array<infer Element> ? WithAsymmetricMatcher<T> | DeeplyAllowMatchers<Element>[] : T extends object ? WithAsymmetricMatcher<T> | { [K in keyof T]: DeeplyAllowMatchers<T[K]> } : WithAsymmetricMatcher<T>;
191
+ interface JestAssertion<T = any> extends jest.Matchers<void, T>, CustomMatcher {
192
+ /**
193
+ * Used when you want to check that two objects have the same value.
194
+ * This matcher recursively checks the equality of all fields, rather than checking for object identity.
195
+ *
196
+ * @example
197
+ * expect(user).toEqual({ name: 'Alice', age: 30 });
198
+ */
199
+ toEqual: <E>(expected: E) => void;
200
+ /**
201
+ * Use to test that objects have the same types as well as structure.
202
+ *
203
+ * @example
204
+ * expect(user).toStrictEqual({ name: 'Alice', age: 30 });
205
+ */
206
+ toStrictEqual: <E>(expected: E) => void;
207
+ /**
208
+ * Checks that a value is what you expect. It calls `Object.is` to compare values.
209
+ * Don't use `toBe` with floating-point numbers.
210
+ *
211
+ * @example
212
+ * expect(result).toBe(42);
213
+ * expect(status).toBe(true);
214
+ */
215
+ toBe: <E>(expected: E) => void;
216
+ /**
217
+ * Check that a string matches a regular expression.
218
+ *
219
+ * @example
220
+ * expect(message).toMatch(/hello/);
221
+ * expect(greeting).toMatch('world');
222
+ */
223
+ toMatch: (expected: string | RegExp) => void;
224
+ /**
225
+ * Used to check that a JavaScript object matches a subset of the properties of an object
226
+ *
227
+ * @example
228
+ * expect(user).toMatchObject({
229
+ * name: 'Alice',
230
+ * address: { city: 'Wonderland' }
231
+ * });
232
+ */
233
+ toMatchObject: <E extends object | any[]>(expected: E) => void;
234
+ /**
235
+ * Used when you want to check that an item is in a list.
236
+ * For testing the items in the list, this uses `===`, a strict equality check.
237
+ *
238
+ * @example
239
+ * expect(items).toContain('apple');
240
+ * expect(numbers).toContain(5);
241
+ */
242
+ toContain: <E>(item: E) => void;
243
+ /**
244
+ * Used when you want to check that an item is in a list.
245
+ * For testing the items in the list, this matcher recursively checks the
246
+ * equality of all fields, rather than checking for object identity.
247
+ *
248
+ * @example
249
+ * expect(items).toContainEqual({ name: 'apple', quantity: 1 });
250
+ */
251
+ toContainEqual: <E>(item: E) => void;
252
+ /**
253
+ * Use when you don't care what a value is, you just want to ensure a value
254
+ * is true in a boolean context. In JavaScript, there are six falsy values:
255
+ * `false`, `0`, `''`, `null`, `undefined`, and `NaN`. Everything else is truthy.
256
+ *
257
+ * @example
258
+ * expect(user.isActive).toBeTruthy();
259
+ */
260
+ toBeTruthy: () => void;
261
+ /**
262
+ * When you don't care what a value is, you just want to
263
+ * ensure a value is false in a boolean context.
264
+ *
265
+ * @example
266
+ * expect(user.isActive).toBeFalsy();
267
+ */
268
+ toBeFalsy: () => void;
269
+ /**
270
+ * For comparing floating point numbers.
271
+ *
272
+ * @example
273
+ * expect(score).toBeGreaterThan(10);
274
+ */
275
+ toBeGreaterThan: (num: number | bigint) => void;
276
+ /**
277
+ * For comparing floating point numbers.
278
+ *
279
+ * @example
280
+ * expect(score).toBeGreaterThanOrEqual(10);
281
+ */
282
+ toBeGreaterThanOrEqual: (num: number | bigint) => void;
283
+ /**
284
+ * For comparing floating point numbers.
285
+ *
286
+ * @example
287
+ * expect(score).toBeLessThan(10);
288
+ */
289
+ toBeLessThan: (num: number | bigint) => void;
290
+ /**
291
+ * For comparing floating point numbers.
292
+ *
293
+ * @example
294
+ * expect(score).toBeLessThanOrEqual(10);
295
+ */
296
+ toBeLessThanOrEqual: (num: number | bigint) => void;
297
+ /**
298
+ * Used to check that a variable is NaN.
299
+ *
300
+ * @example
301
+ * expect(value).toBeNaN();
302
+ */
303
+ toBeNaN: () => void;
304
+ /**
305
+ * Used to check that a variable is undefined.
306
+ *
307
+ * @example
308
+ * expect(value).toBeUndefined();
309
+ */
310
+ toBeUndefined: () => void;
311
+ /**
312
+ * This is the same as `.toBe(null)` but the error messages are a bit nicer.
313
+ * So use `.toBeNull()` when you want to check that something is null.
314
+ *
315
+ * @example
316
+ * expect(value).toBeNull();
317
+ */
318
+ toBeNull: () => void;
319
+ /**
320
+ * Used to check that a variable is nullable (null or undefined).
321
+ *
322
+ * @example
323
+ * expect(value).toBeNullable();
324
+ */
325
+ toBeNullable: () => void;
326
+ /**
327
+ * Ensure that a variable is not undefined.
328
+ *
329
+ * @example
330
+ * expect(value).toBeDefined();
331
+ */
332
+ toBeDefined: () => void;
333
+ /**
334
+ * Ensure that an object is an instance of a class.
335
+ * This matcher uses `instanceof` underneath.
336
+ *
337
+ * @example
338
+ * expect(new Date()).toBeInstanceOf(Date);
339
+ */
340
+ toBeInstanceOf: <E>(expected: E) => void;
341
+ /**
342
+ * Used to check that an object has a `.length` property
343
+ * and it is set to a certain numeric value.
344
+ *
345
+ * @example
346
+ * expect([1, 2, 3]).toHaveLength(3);
347
+ * expect('hello').toHaveLength(5);
348
+ */
349
+ toHaveLength: (length: number) => void;
350
+ /**
351
+ * Use to check if a property at the specified path exists on an object.
352
+ * For checking deeply nested properties, you may use dot notation or an array containing
353
+ * the path segments for deep references.
354
+ *
355
+ * Optionally, you can provide a value to check if it matches the value present at the path
356
+ * on the target object. This matcher uses 'deep equality' (like `toEqual()`) and recursively checks
357
+ * the equality of all fields.
358
+ *
359
+ * @example
360
+ * expect(user).toHaveProperty('address.city', 'New York');
361
+ * expect(config).toHaveProperty(['settings', 'theme'], 'dark');
362
+ */
363
+ toHaveProperty: <E>(property: string | (string | number)[], value?: E) => void;
364
+ /**
365
+ * Using exact equality with floating point numbers is a bad idea.
366
+ * Rounding means that intuitive things fail.
367
+ * The default for `numDigits` is 2.
368
+ *
369
+ * @example
370
+ * expect(price).toBeCloseTo(9.99, 2);
371
+ */
372
+ toBeCloseTo: (number: number, numDigits?: number) => void;
373
+ /**
374
+ * Ensures that a mock function is called an exact number of times.
375
+ *
376
+ * Also under the alias `expect.toBeCalledTimes`.
377
+ *
378
+ * @example
379
+ * expect(mockFunc).toHaveBeenCalledTimes(2);
380
+ */
381
+ toHaveBeenCalledTimes: (times: number) => void;
382
+ /**
383
+ * Ensures that a mock function is called an exact number of times.
384
+ *
385
+ * Alias for `expect.toHaveBeenCalledTimes`.
386
+ *
387
+ * @example
388
+ * expect(mockFunc).toBeCalledTimes(2);
389
+ * @deprecated Use `toHaveBeenCalledTimes` instead
390
+ */
391
+ toBeCalledTimes: (times: number) => void;
392
+ /**
393
+ * Ensures that a mock function is called.
394
+ *
395
+ * Also under the alias `expect.toBeCalled`.
396
+ *
397
+ * @example
398
+ * expect(mockFunc).toHaveBeenCalled();
399
+ */
400
+ toHaveBeenCalled: () => void;
401
+ /**
402
+ * Ensures that a mock function is called.
403
+ *
404
+ * Alias for `expect.toHaveBeenCalled`.
405
+ *
406
+ * @example
407
+ * expect(mockFunc).toBeCalled();
408
+ * @deprecated Use `toHaveBeenCalled` instead
409
+ */
410
+ toBeCalled: () => void;
411
+ /**
412
+ * Ensure that a mock function is called with specific arguments.
413
+ *
414
+ * Also under the alias `expect.toBeCalledWith`.
415
+ *
416
+ * @example
417
+ * expect(mockFunc).toHaveBeenCalledWith('arg1', 42);
418
+ */
419
+ toHaveBeenCalledWith: <E extends any[]>(...args: E) => void;
420
+ /**
421
+ * Ensure that a mock function is called with specific arguments.
422
+ *
423
+ * Alias for `expect.toHaveBeenCalledWith`.
424
+ *
425
+ * @example
426
+ * expect(mockFunc).toBeCalledWith('arg1', 42);
427
+ * @deprecated Use `toHaveBeenCalledWith` instead
428
+ */
429
+ toBeCalledWith: <E extends any[]>(...args: E) => void;
430
+ /**
431
+ * Ensure that a mock function is called with specific arguments on an Nth call.
432
+ *
433
+ * Also under the alias `expect.nthCalledWith`.
434
+ *
435
+ * @example
436
+ * expect(mockFunc).toHaveBeenNthCalledWith(2, 'secondArg');
437
+ */
438
+ toHaveBeenNthCalledWith: <E extends any[]>(n: number, ...args: E) => void;
439
+ /**
440
+ * If you have a mock function, you can use `.toHaveBeenLastCalledWith`
441
+ * to test what arguments it was last called with.
442
+ *
443
+ * Also under the alias `expect.lastCalledWith`.
444
+ *
445
+ * @example
446
+ * expect(mockFunc).toHaveBeenLastCalledWith('lastArg');
447
+ */
448
+ toHaveBeenLastCalledWith: <E extends any[]>(...args: E) => void;
449
+ /**
450
+ * Used to test that a function throws when it is called.
451
+ *
452
+ * Also under the alias `expect.toThrowError`.
453
+ *
454
+ * @example
455
+ * expect(() => functionWithError()).toThrow('Error message');
456
+ * expect(() => parseJSON('invalid')).toThrow(SyntaxError);
457
+ * expect(() => { throw 42 }).toThrow(42);
458
+ */
459
+ toThrow: (expected?: any) => void;
460
+ /**
461
+ * Used to test that a function throws when it is called.
462
+ *
463
+ * Alias for `expect.toThrow`.
464
+ *
465
+ * @example
466
+ * expect(() => functionWithError()).toThrowError('Error message');
467
+ * expect(() => parseJSON('invalid')).toThrowError(SyntaxError);
468
+ * expect(() => { throw 42 }).toThrowError(42);
469
+ * @deprecated Use `toThrow` instead
470
+ */
471
+ toThrowError: (expected?: any) => void;
472
+ /**
473
+ * Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time
474
+ *
475
+ * Alias for `expect.toHaveReturned`.
476
+ *
477
+ * @example
478
+ * expect(mockFunc).toReturn();
479
+ * @deprecated Use `toHaveReturned` instead
480
+ */
481
+ toReturn: () => void;
482
+ /**
483
+ * Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time
484
+ *
485
+ * Also under the alias `expect.toReturn`.
486
+ *
487
+ * @example
488
+ * expect(mockFunc).toHaveReturned();
489
+ */
490
+ toHaveReturned: () => void;
491
+ /**
492
+ * Use to ensure that a mock function returned successfully (i.e., did not throw an error) an exact number of times.
493
+ * Any calls to the mock function that throw an error are not counted toward the number of times the function returned.
494
+ *
495
+ * Alias for `expect.toHaveReturnedTimes`.
496
+ *
497
+ * @example
498
+ * expect(mockFunc).toReturnTimes(3);
499
+ * @deprecated Use `toHaveReturnedTimes` instead
500
+ */
501
+ toReturnTimes: (times: number) => void;
502
+ /**
503
+ * Use to ensure that a mock function returned successfully (i.e., did not throw an error) an exact number of times.
504
+ * Any calls to the mock function that throw an error are not counted toward the number of times the function returned.
505
+ *
506
+ * Also under the alias `expect.toReturnTimes`.
507
+ *
508
+ * @example
509
+ * expect(mockFunc).toHaveReturnedTimes(3);
510
+ */
511
+ toHaveReturnedTimes: (times: number) => void;
512
+ /**
513
+ * Use to ensure that a mock function returned a specific value.
514
+ *
515
+ * Alias for `expect.toHaveReturnedWith`.
516
+ *
517
+ * @example
518
+ * expect(mockFunc).toReturnWith('returnValue');
519
+ * @deprecated Use `toHaveReturnedWith` instead
520
+ */
521
+ toReturnWith: <E>(value: E) => void;
522
+ /**
523
+ * Use to ensure that a mock function returned a specific value.
524
+ *
525
+ * Also under the alias `expect.toReturnWith`.
526
+ *
527
+ * @example
528
+ * expect(mockFunc).toHaveReturnedWith('returnValue');
529
+ */
530
+ toHaveReturnedWith: <E>(value: E) => void;
531
+ /**
532
+ * Use to test the specific value that a mock function last returned.
533
+ * If the last call to the mock function threw an error, then this matcher will fail
534
+ * no matter what value you provided as the expected return value.
535
+ *
536
+ * Also under the alias `expect.lastReturnedWith`.
537
+ *
538
+ * @example
539
+ * expect(mockFunc).toHaveLastReturnedWith('lastValue');
540
+ */
541
+ toHaveLastReturnedWith: <E>(value: E) => void;
542
+ /**
543
+ * Use to test the specific value that a mock function returned for the nth call.
544
+ * If the nth call to the mock function threw an error, then this matcher will fail
545
+ * no matter what value you provided as the expected return value.
546
+ *
547
+ * Also under the alias `expect.nthReturnedWith`.
548
+ *
549
+ * @example
550
+ * expect(mockFunc).toHaveNthReturnedWith(2, 'nthValue');
551
+ */
552
+ toHaveNthReturnedWith: <E>(nthCall: number, value: E) => void;
553
+ }
554
+ type VitestAssertion<A, T> = { [K in keyof A]: A[K] extends Chai.Assertion ? Assertion<T> : A[K] extends ((...args: any[]) => any) ? A[K] : VitestAssertion<A[K], T> } & ((type: string, message?: string) => Assertion);
555
+ type Promisify<O> = { [K in keyof O]: O[K] extends ((...args: infer A) => infer R) ? Promisify<O[K]> & ((...args: A) => Promise<R>) : O[K] };
556
+ type PromisifyAssertion<T> = Promisify<Assertion<T>>;
557
+ interface Assertion<T = any> extends VitestAssertion<Chai.Assertion, T>, JestAssertion<T>, ChaiMockAssertion, Matchers<T> {
558
+ /**
559
+ * Ensures a value is of a specific type.
560
+ *
561
+ * @example
562
+ * expect(value).toBeTypeOf('string');
563
+ * expect(number).toBeTypeOf('number');
564
+ */
565
+ toBeTypeOf: (expected: "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined") => void;
566
+ /**
567
+ * Asserts that a mock function was called exactly once.
568
+ *
569
+ * @example
570
+ * expect(mockFunc).toHaveBeenCalledOnce();
571
+ */
572
+ toHaveBeenCalledOnce: () => void;
573
+ /**
574
+ * Ensure that a mock function is called with specific arguments and called
575
+ * exactly once.
576
+ *
577
+ * @example
578
+ * expect(mockFunc).toHaveBeenCalledExactlyOnceWith('arg1', 42);
579
+ */
580
+ toHaveBeenCalledExactlyOnceWith: <E extends any[]>(...args: E) => void;
581
+ /**
582
+ * This assertion checks if a `Mock` was called before another `Mock`.
583
+ * @param mock - A mock function created by `vi.spyOn` or `vi.fn`
584
+ * @param failIfNoFirstInvocation - Fail if the first mock was never called
585
+ * @example
586
+ * const mock1 = vi.fn()
587
+ * const mock2 = vi.fn()
588
+ *
589
+ * mock1()
590
+ * mock2()
591
+ * mock1()
592
+ *
593
+ * expect(mock1).toHaveBeenCalledBefore(mock2)
594
+ */
595
+ toHaveBeenCalledBefore: (mock: MockInstance, failIfNoFirstInvocation?: boolean) => void;
596
+ /**
597
+ * This assertion checks if a `Mock` was called after another `Mock`.
598
+ * @param mock - A mock function created by `vi.spyOn` or `vi.fn`
599
+ * @param failIfNoFirstInvocation - Fail if the first mock was never called
600
+ * @example
601
+ * const mock1 = vi.fn()
602
+ * const mock2 = vi.fn()
603
+ *
604
+ * mock2()
605
+ * mock1()
606
+ * mock2()
607
+ *
608
+ * expect(mock1).toHaveBeenCalledAfter(mock2)
609
+ */
610
+ toHaveBeenCalledAfter: (mock: MockInstance, failIfNoFirstInvocation?: boolean) => void;
611
+ /**
612
+ * Checks that a promise resolves successfully at least once.
613
+ *
614
+ * @example
615
+ * await expect(promise).toHaveResolved();
616
+ */
617
+ toHaveResolved: () => void;
618
+ /**
619
+ * Checks that a promise resolves to a specific value.
620
+ *
621
+ * @example
622
+ * await expect(promise).toHaveResolvedWith('success');
623
+ */
624
+ toHaveResolvedWith: <E>(value: E) => void;
625
+ /**
626
+ * Ensures a promise resolves a specific number of times.
627
+ *
628
+ * @example
629
+ * expect(mockAsyncFunc).toHaveResolvedTimes(3);
630
+ */
631
+ toHaveResolvedTimes: (times: number) => void;
632
+ /**
633
+ * Asserts that the last resolved value of a promise matches an expected value.
634
+ *
635
+ * @example
636
+ * await expect(mockAsyncFunc).toHaveLastResolvedWith('finalResult');
637
+ */
638
+ toHaveLastResolvedWith: <E>(value: E) => void;
639
+ /**
640
+ * Ensures a specific value was returned by a promise on the nth resolution.
641
+ *
642
+ * @example
643
+ * await expect(mockAsyncFunc).toHaveNthResolvedWith(2, 'secondResult');
644
+ */
645
+ toHaveNthResolvedWith: <E>(nthCall: number, value: E) => void;
646
+ /**
647
+ * Verifies that a promise resolves.
648
+ *
649
+ * @example
650
+ * await expect(someAsyncFunc).resolves.toBe(42);
651
+ */
652
+ resolves: PromisifyAssertion<T>;
653
+ /**
654
+ * Verifies that a promise rejects.
655
+ *
656
+ * @example
657
+ * await expect(someAsyncFunc).rejects.toThrow('error');
658
+ */
659
+ rejects: PromisifyAssertion<T>;
660
+ }
661
+ /**
662
+ * Chai-style assertions for spy/mock testing.
663
+ * These provide sinon-chai compatible assertion names that delegate to Jest-style implementations.
664
+ */
665
+ interface ChaiMockAssertion {
666
+ /**
667
+ * Checks that a spy was called at least once.
668
+ * Chai-style equivalent of `toHaveBeenCalled`.
669
+ *
670
+ * @example
671
+ * expect(spy).to.have.been.called
672
+ */
673
+ readonly called: Assertion;
674
+ /**
675
+ * Checks that a spy was called a specific number of times.
676
+ * Chai-style equivalent of `toHaveBeenCalledTimes`.
677
+ *
678
+ * @example
679
+ * expect(spy).to.have.callCount(3)
680
+ */
681
+ callCount: (count: number) => void;
682
+ /**
683
+ * Checks that a spy was called with specific arguments at least once.
684
+ * Chai-style equivalent of `toHaveBeenCalledWith`.
685
+ *
686
+ * @example
687
+ * expect(spy).to.have.been.calledWith('arg1', 'arg2')
688
+ */
689
+ calledWith: <E extends any[]>(...args: E) => void;
690
+ /**
691
+ * Checks that a spy was called exactly once.
692
+ * Chai-style equivalent of `toHaveBeenCalledOnce`.
693
+ *
694
+ * @example
695
+ * expect(spy).to.have.been.calledOnce
696
+ */
697
+ readonly calledOnce: Assertion;
698
+ /**
699
+ * Checks that a spy was called exactly once with specific arguments.
700
+ * Chai-style equivalent of `toHaveBeenCalledExactlyOnceWith`.
701
+ *
702
+ * @example
703
+ * expect(spy).to.have.been.calledOnceWith('arg1', 'arg2')
704
+ */
705
+ calledOnceWith: <E extends any[]>(...args: E) => void;
706
+ /**
707
+ * Checks that the last call to a spy was made with specific arguments.
708
+ * Chai-style equivalent of `toHaveBeenLastCalledWith`.
709
+ *
710
+ * @example
711
+ * expect(spy).to.have.been.lastCalledWith('arg1', 'arg2')
712
+ */
713
+ lastCalledWith: <E extends any[]>(...args: E) => void;
714
+ /**
715
+ * Checks that the nth call to a spy was made with specific arguments.
716
+ * Chai-style equivalent of `toHaveBeenNthCalledWith`.
717
+ *
718
+ * @example
719
+ * expect(spy).to.have.been.nthCalledWith(2, 'arg1', 'arg2')
720
+ */
721
+ nthCalledWith: <E extends any[]>(n: number, ...args: E) => void;
722
+ /**
723
+ * Checks that a spy returned successfully at least once.
724
+ * Chai-style equivalent of `toHaveReturned`.
725
+ *
726
+ * @example
727
+ * expect(spy).to.have.returned
728
+ */
729
+ readonly returned: Assertion;
730
+ /**
731
+ * Checks that a spy returned a specific value at least once.
732
+ * Chai-style equivalent of `toHaveReturnedWith`.
733
+ *
734
+ * @example
735
+ * expect(spy).to.have.returnedWith('value')
736
+ */
737
+ returnedWith: <E>(value: E) => void;
738
+ /**
739
+ * Checks that a spy returned successfully a specific number of times.
740
+ * Chai-style equivalent of `toHaveReturnedTimes`.
741
+ *
742
+ * @example
743
+ * expect(spy).to.have.returnedTimes(3)
744
+ */
745
+ returnedTimes: (count: number) => void;
746
+ /**
747
+ * Checks that the last return value of a spy matches the expected value.
748
+ * Chai-style equivalent of `toHaveLastReturnedWith`.
749
+ *
750
+ * @example
751
+ * expect(spy).to.have.lastReturnedWith('value')
752
+ */
753
+ lastReturnedWith: <E>(value: E) => void;
754
+ /**
755
+ * Checks that the nth return value of a spy matches the expected value.
756
+ * Chai-style equivalent of `toHaveNthReturnedWith`.
757
+ *
758
+ * @example
759
+ * expect(spy).to.have.nthReturnedWith(2, 'value')
760
+ */
761
+ nthReturnedWith: <E>(n: number, value: E) => void;
762
+ /**
763
+ * Checks that a spy was called before another spy.
764
+ * Chai-style equivalent of `toHaveBeenCalledBefore`.
765
+ *
766
+ * @example
767
+ * expect(spy1).to.have.been.calledBefore(spy2)
768
+ */
769
+ calledBefore: (mock: MockInstance, failIfNoFirstInvocation?: boolean) => void;
770
+ /**
771
+ * Checks that a spy was called after another spy.
772
+ * Chai-style equivalent of `toHaveBeenCalledAfter`.
773
+ *
774
+ * @example
775
+ * expect(spy1).to.have.been.calledAfter(spy2)
776
+ */
777
+ calledAfter: (mock: MockInstance, failIfNoFirstInvocation?: boolean) => void;
778
+ /**
779
+ * Checks that a spy was called exactly twice.
780
+ * Chai-style equivalent of `toHaveBeenCalledTimes(2)`.
781
+ *
782
+ * @example
783
+ * expect(spy).to.have.been.calledTwice
784
+ */
785
+ readonly calledTwice: Assertion;
786
+ /**
787
+ * Checks that a spy was called exactly three times.
788
+ * Chai-style equivalent of `toHaveBeenCalledTimes(3)`.
789
+ *
790
+ * @example
791
+ * expect(spy).to.have.been.calledThrice
792
+ */
793
+ readonly calledThrice: Assertion;
794
+ }
795
+ declare global {
796
+ namespace jest {
797
+ interface Matchers<R, T = {}> {}
798
+ }
799
+ }
800
+ //#endregion
801
+ export { type Assertion, type AsymmetricMatchersContaining, type DeeplyAllowMatchers, type ExpectStatic, type ExpectationResult, type JestAssertion, type MatcherState, type Matchers, type PromisifyAssertion, type RawMatcherFn, type Tester };
802
+ //# sourceMappingURL=index.d.ts.map