test: add unit tests for the module (#892)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Juho Rutila
2023-11-02 12:00:20 +02:00
committed by GitHub
parent a2d70f04e9
commit ed4b5e0077
7 changed files with 420 additions and 13 deletions

10
test/vitest.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
import type { Assertion, AsymmetricMatchersContaining } from 'vitest'
interface CustomMatchers<R = unknown> {
toBeRegExp(expected: string | RegExp): R
}
declare module 'vitest' {
interface Assertion<T = any> extends CustomMatchers<T> {}
interface AsymmetricMatchersContaining extends CustomMatchers {}
}