eslint-config/test/vitest.d.ts
Naomi Carrigan 70fcc1a49a
feat: add testing for the global configs
We want to make sure we aren't missing anything important.
2024-09-25 22:31:08 -07:00

19 lines
568 B
TypeScript

/// <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;
}
}