diff --git a/package.json b/package.json index 419345b..7b7b36b 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "rimraf": "^6.0.1", "rollup": "^4.0.0", "ts-jest": "^29.0.0", - "typescript": "^5.0.0", + "typescript": "^6.0.3", "typescript-eslint": "^8.56.0" }, "jest": { @@ -67,7 +67,12 @@ "/src" ], "transform": { - "^.+\\.tsx?$": "ts-jest" + "^.+\\.tsx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.test.json" + } + ] }, "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", "moduleFileExtensions": [ diff --git a/tsconfig.json b/tsconfig.json index a30771a..7b1ad35 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -41,7 +41,7 @@ "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, /* Module Resolution Options */ - "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + "moduleResolution": "bundler" /* Specify module resolution strategy: 'bundler' for use with bundlers like Rollup. */, // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ @@ -65,5 +65,6 @@ /* Advanced Options */ "skipLibCheck": true /* Skip type checking of declaration files. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ - } + }, + "exclude": ["**/*.test.ts", "**/*.spec.ts"] } diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..e9174fb --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": ["jest"] + }, + "exclude": ["dist"] +}