diff --git a/jest.config.mjs b/jest.config.ts similarity index 65% rename from jest.config.mjs rename to jest.config.ts index 67911ed1..aa8ed5cd 100644 --- a/jest.config.mjs +++ b/jest.config.ts @@ -1,16 +1,15 @@ -/** @typedef {import("jest")} jestConfig */ -const jestConfig = { +import type { JestConfigWithTsJest } from "ts-jest" + +const jestConfig: JestConfigWithTsJest = { + testMatch: ["**/*.test.ts"], + testEnvironment: "node", + // transform configurations preset: "ts-jest/presets/js-with-ts-esm", extensionsToTreatAsEsm: [".ts"], - transformIgnorePatterns: [], // transform everything - testEnvironment: "node", - testMatch: ["**/*.test.ts"], - testPathIgnorePatterns: ["/src/python/setup-python/"], - // tsconfig + transformIgnorePatterns: [], // transform node_modules transform: { "^.+\\.tsx?$": [ "ts-jest", - /** @type {import("ts-jest")} */ { importHelpers: true, useESM: true, diff --git a/tsconfig.json b/tsconfig.json index cf6cafaf..01617e2a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,6 +32,7 @@ "./src", "dev/scripts", "packages/untildify-user/untildify.ts", - "dev/docker/__tests__/generate-docker-tests.mjs" + "dev/docker/__tests__/generate-docker-tests.mjs", + "./jest.config.ts" ] }