We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccc0c25 commit 961fed8Copy full SHA for 961fed8
server/tests/unit/api/room.spec.ts
@@ -142,7 +142,6 @@ describe("Room API", () => {
142
.expect("Content-Type", /json/)
143
.expect(404);
144
expect(resp.body.success).toEqual(false);
145
- // @ts-expect-error I can't get typescript to acknowledge the custom matchers.
146
expect(resp.body.error).toBeRoomNotFound();
147
});
148
server/tests/unit/vitest.d.ts
@@ -0,0 +1,11 @@
1
+import type { Assertion, AsymmetricMatchersContaining } from "vitest";
2
+
3
+interface OttMatchers<R = unknown> {
4
+ toBeRoomNotFound: () => R;
5
+ toBeUnknownError: () => R;
6
+}
7
8
+declare module "vitest" {
9
+ interface Assertion<T = any> extends OttMatchers<T> {}
10
+ interface AsymmetricMatchersContaining extends OttMatchers {}
11
0 commit comments