mon-entreprise/site/test/vitest.d.ts

21 lines
570 B
TypeScript
Raw Normal View History

2024-11-06 20:12:37 +00:00
import 'vitest'
import { DottedName } from 'modele-social'
import { Evaluation } from 'publicodes'
import { PublicodesTypes } from './modele-social/helpers/PublicodesTypes'
interface CustomMatchers<R = unknown> {
toEvaluate: <T extends PublicodesTypes>(
rule: DottedName,
value: Evaluation<T>
) => R
2024-11-13 18:09:48 +00:00
toBeApplicable: (rule: DottedName) => R
2024-11-06 20:12:37 +00:00
}
declare module 'vitest' {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
interface Assertion<T = any> extends CustomMatchers<T> {}
interface AsymmetricMatchersContaining extends CustomMatchers {}
}