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

21 lines
602 B
TypeScript
Raw Normal View History

2024-11-06 20:12:37 +00:00
import 'vitest'
import { DottedName } from 'modele-social'
2024-12-03 21:07:44 +00:00
import { Evaluation, PublicodesExpression } from 'publicodes'
2024-11-06 20:12:37 +00:00
import { PublicodesTypes } from './modele-social/helpers/PublicodesTypes'
interface CustomMatchers<R = unknown> {
toEvaluate: <T extends PublicodesTypes>(
2024-12-03 21:07:44 +00:00
rule: PublicodesExpression,
2024-11-06 20:12:37 +00:00
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 {}
}