-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathvitest.setup.ts
More file actions
24 lines (19 loc) · 887 Bytes
/
vitest.setup.ts
File metadata and controls
24 lines (19 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// (C) 2023-2026 GoodData Corporation
// oxlint-disable @typescript-eslint/no-empty-object-type
import { cleanup } from "@testing-library/react";
import { afterEach, expect } from "vitest";
import * as matchers from "vitest-dom/dist/matchers.js";
import { type TestingLibraryMatchers } from "vitest-dom/dist/matchers.js";
/**
* Exports of types and matchers of vitest-dom is currently broken we need export matchers from dist and define types manually
*/
declare module "vitest" {
// eslint-disable-next-line @typescript-eslint/naming-convention
interface Assertion<T = any> extends TestingLibraryMatchers<typeof expect.stringContaining, T> {}
// eslint-disable-next-line @typescript-eslint/naming-convention
interface AsymmetricMatchersContaining extends TestingLibraryMatchers<unknown, unknown> {}
}
expect.extend(matchers);
afterEach(() => {
cleanup();
});