Skip to content

Commit dd21bfd

Browse files
committed
wip
1 parent 332c963 commit dd21bfd

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed
Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
// types/vitest.d.ts
22
import 'vitest';
3+
import {describe, expect} from "vitest";
4+
5+
interface CustomMatchers<R = unknown> {
6+
toMatchPath(path: string): void;
7+
toStartWithPath(path: string): void;
8+
toContainPath(path: string): void;
9+
toEndWithPath(path: string): void;
10+
}
11+
12+
interface CustomAsymmetricMatchers<R = unknown> {
13+
pathToMatch(path: string): void;
14+
pathToStartWith(path: string): void;
15+
pathToContain(path: string): void;
16+
pathToEndWith(path: string): void;
17+
}
318

419
declare module 'vitest' {
5-
type Assertion<T = any> = {
6-
toMatchPath(path: string): void;
7-
toStartWithPath(path: string): void;
8-
toContainPath(path: string): void;
9-
toEndWithPath(path: string): void;
10-
};
20+
interface Assertion<T = any> extends CustomMatchers<T> {};
21+
interface AsymmetricMatchersContaining extends CustomAsymmetricMatchers {}
1122
}

0 commit comments

Comments
 (0)