From 83fc1fa5204329c5e5bdcff6ccd16cfcde99d455 Mon Sep 17 00:00:00 2001 From: Diego Aquino Date: Sun, 25 Aug 2024 10:06:32 -0300 Subject: [PATCH] test(examples): revert jest-dom import and add type source --- examples/with-vitest-browser/tests/setup.ts | 2 +- examples/with-vitest-browser/tsconfig.json | 3 ++- examples/with-vitest-jsdom/tests/setup.ts | 2 +- examples/with-vitest-jsdom/tsconfig.json | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/with-vitest-browser/tests/setup.ts b/examples/with-vitest-browser/tests/setup.ts index 678fea2d..8ddf3574 100644 --- a/examples/with-vitest-browser/tests/setup.ts +++ b/examples/with-vitest-browser/tests/setup.ts @@ -1,4 +1,4 @@ -import '@testing-library/jest-dom'; +import '@testing-library/jest-dom/vitest'; import { beforeAll, afterEach, afterAll } from 'vitest'; diff --git a/examples/with-vitest-browser/tsconfig.json b/examples/with-vitest-browser/tsconfig.json index a3c582ee..22be41f8 100644 --- a/examples/with-vitest-browser/tsconfig.json +++ b/examples/with-vitest-browser/tsconfig.json @@ -10,7 +10,8 @@ "skipLibCheck": true, "pretty": true, "strict": true, - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "types": ["@testing-library/jest-dom"] }, "include": ["**/*.ts", "**/*.mts"], "exclude": ["node_modules"] diff --git a/examples/with-vitest-jsdom/tests/setup.ts b/examples/with-vitest-jsdom/tests/setup.ts index 678fea2d..8ddf3574 100644 --- a/examples/with-vitest-jsdom/tests/setup.ts +++ b/examples/with-vitest-jsdom/tests/setup.ts @@ -1,4 +1,4 @@ -import '@testing-library/jest-dom'; +import '@testing-library/jest-dom/vitest'; import { beforeAll, afterEach, afterAll } from 'vitest'; diff --git a/examples/with-vitest-jsdom/tsconfig.json b/examples/with-vitest-jsdom/tsconfig.json index a3c582ee..22be41f8 100644 --- a/examples/with-vitest-jsdom/tsconfig.json +++ b/examples/with-vitest-jsdom/tsconfig.json @@ -10,7 +10,8 @@ "skipLibCheck": true, "pretty": true, "strict": true, - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "types": ["@testing-library/jest-dom"] }, "include": ["**/*.ts", "**/*.mts"], "exclude": ["node_modules"]