diff --git a/jest.config.ts b/jest.config.ts index d76ce6cad..c4e6cd069 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -20,6 +20,7 @@ // import type { Config } from "jest"; +import { createJsWithTsPreset, type JestConfigWithTsJest } from "ts-jest"; type ArrayElement = MyArray extends Array ? T : never; @@ -32,13 +33,19 @@ const baseConfig: ArrayElement> = { clearMocks: true, injectGlobals: false, setupFilesAfterEnv: ["/jest.setup.ts"], + moduleNameMapper: { + "^jose": require.resolve("jose"), + }, }; // Required by @peculiar/webcrypto, which comes from the polyfills // loaded in the setup file. process.env.OPENSSL_CONF = "/dev/null"; -const config: Config = { +const presetConfig = createJsWithTsPreset({}); + +const config: JestConfigWithTsJest = { + ...presetConfig, reporters: ["default", "github-actions"], collectCoverage: true, coverageReporters: process.env.CI ? ["text", "lcov"] : ["text"], diff --git a/package-lock.json b/package-lock.json index 3e6b9948a..08763392e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,7 +46,7 @@ "ts-node": "^10.9.2", "typedoc": "^0.27.6", "typedoc-plugin-markdown": "^3.17.1", - "typescript": "^5.5.4" + "typescript": "^5.7.3" }, "engines": { "node": "^18.0.0 || ^20.0.0 || ^22.0.0" @@ -3032,19 +3032,6 @@ "node": ">=10" } }, - "node_modules/@inrupt/eslint-config-lib/node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/@inrupt/internal-playwright-helpers": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@inrupt/internal-playwright-helpers/-/internal-playwright-helpers-3.2.4.tgz", @@ -22051,9 +22038,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 2ae811145..fd23cec11 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "ts-node": "^10.9.2", "typedoc": "^0.27.6", "typedoc-plugin-markdown": "^3.17.1", - "typescript": "^5.5.4" + "typescript": "^5.7.3" }, "optionalDependencies": { "@nx/nx-win32-x64-msvc": "^20.3.1",