generated from nhcarrigan/template
feat: add testing for the global configs
We want to make sure we aren't missing anything important.
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
/// <reference types="vitest" />
|
||||
|
||||
import type { Assertion, AsymmetricMatchersContaining } from 'vitest';
|
||||
|
||||
interface CustomMatchers<R = unknown> {
|
||||
toContainRules(expected: Record<string, unknown>): R;
|
||||
}
|
||||
|
||||
declare module 'vitest' {
|
||||
interface Assertion<T = any> extends CustomMatchers<T> {}
|
||||
interface AsymmetricMatchersContaining extends CustomMatchers {}
|
||||
}
|
||||
|
||||
declare module 'vitest' {
|
||||
// @ts-expect-error We need to extend the TestAPI interface
|
||||
export interface TestAPI {
|
||||
extend: <T>(matchers: Record<string, (this: T, ...args: any[]) => any>) => void;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user