diff --git a/test/index.spec.jsx b/test/index.spec.tsx similarity index 97% rename from test/index.spec.jsx rename to test/index.spec.tsx index 09f0ffe..d7ec85a 100644 --- a/test/index.spec.jsx +++ b/test/index.spec.tsx @@ -18,7 +18,6 @@ describe('Animate', () => { expect(element).toHaveStyle({ opacity: 0, }); - done(); }, 700); }); @@ -37,7 +36,6 @@ describe('Animate', () => { expect(num).toEqual(0); setTimeout(() => { expect(num).toEqual(1); - done(); }, 700); }); @@ -85,7 +83,6 @@ describe('Animate', () => { setTimeout(() => { expect(firstStatus).toEqual('yes'); expect(secondStatus).toEqual('yes'); - done(); }, 1400); }); }); diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 0000000..78893ff --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "esModuleInterop": true, + "jsx": "react", + "module": "commonjs", + "noEmit": true, + "noImplicitAny": false, + "skipLibCheck": true, + "target": "es6", + "types": ["vitest/globals"] + }, + "include": ["./**/*", "../types.d.ts"] +} diff --git a/tsconfig.json b/tsconfig.json index e47062d..10f5ec3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,5 +17,5 @@ "types": ["vitest/globals"], "allowJs": true }, - "include": ["./src/**/*", "types.d.ts"] + "include": ["./src/**/*"] } diff --git a/vitest.config.mts b/vitest.config.mts index d5977b4..9e0cc79 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -1,3 +1,4 @@ +/// // eslint-disable-next-line import/no-unresolved import { defineConfig } from 'vitest/config'; import react from '@vitejs/plugin-react'; @@ -10,7 +11,7 @@ export default defineConfig({ environment: 'jsdom', globals: true, setupFiles: ['test/vitest.setup.ts'], - exclude: ['react-smooth', 'node_modules', 'dist', '.idea', '.git', '.cache', 'build', 'scripts', '.stryker-tmp'], + exclude: ['node_modules', 'dist', '.idea', '.git', '.cache', 'build', 'scripts'], coverage: { provider: 'v8', include: ['src', 'test'],