Skip to content

Commit

Permalink
opa-react: fix typescript errors for vite matchers
Browse files Browse the repository at this point in the history
Following the instructions shared here:
testing-library/jest-dom#439 (comment)

Signed-off-by: Stephan Renatus <[email protected]>
  • Loading branch information
srenatus committed Jul 5, 2024
1 parent 0091cbb commit 504f1de
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/opa-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@types/lodash.merge": "^4.6.9",
"@types/react": ">=18.0.0",
Expand Down
10 changes: 0 additions & 10 deletions packages/opa-react/tests/setup.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
import { expect, afterEach } from "vitest";
import { cleanup } from "@testing-library/react";
import "@testing-library/jest-dom";
import * as matchers from "@testing-library/jest-dom/matchers";
import "@testing-library/jest-dom/vitest";

expect.extend(matchers);

afterEach(() => {
cleanup();
});
2 changes: 1 addition & 1 deletion packages/opa-react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"compilerOptions": {
"jsx": "react-jsx",
"allowSyntheticDefaultImports": true,
"types": ["@testing-library/jest-dom"]
"types": ["vitest/globals"]
}
}

0 comments on commit 504f1de

Please sign in to comment.