mirror of https://github.com/aminya/setup-cpp
test: configure jest in typescript
This commit is contained in:
parent
f0d23edbf1
commit
9fabf05a6b
|
@ -1,16 +1,15 @@
|
||||||
/** @typedef {import("jest")} jestConfig */
|
import type { JestConfigWithTsJest } from "ts-jest"
|
||||||
const jestConfig = {
|
|
||||||
|
const jestConfig: JestConfigWithTsJest = {
|
||||||
|
testMatch: ["**/*.test.ts"],
|
||||||
|
testEnvironment: "node",
|
||||||
|
// transform configurations
|
||||||
preset: "ts-jest/presets/js-with-ts-esm",
|
preset: "ts-jest/presets/js-with-ts-esm",
|
||||||
extensionsToTreatAsEsm: [".ts"],
|
extensionsToTreatAsEsm: [".ts"],
|
||||||
transformIgnorePatterns: [], // transform everything
|
transformIgnorePatterns: [], // transform node_modules
|
||||||
testEnvironment: "node",
|
|
||||||
testMatch: ["**/*.test.ts"],
|
|
||||||
testPathIgnorePatterns: ["<rootDir>/src/python/setup-python/"],
|
|
||||||
// tsconfig
|
|
||||||
transform: {
|
transform: {
|
||||||
"^.+\\.tsx?$": [
|
"^.+\\.tsx?$": [
|
||||||
"ts-jest",
|
"ts-jest",
|
||||||
/** @type {import("ts-jest")} */
|
|
||||||
{
|
{
|
||||||
importHelpers: true,
|
importHelpers: true,
|
||||||
useESM: true,
|
useESM: true,
|
|
@ -32,6 +32,7 @@
|
||||||
"./src",
|
"./src",
|
||||||
"dev/scripts",
|
"dev/scripts",
|
||||||
"packages/untildify-user/untildify.ts",
|
"packages/untildify-user/untildify.ts",
|
||||||
"dev/docker/__tests__/generate-docker-tests.mjs"
|
"dev/docker/__tests__/generate-docker-tests.mjs",
|
||||||
|
"./jest.config.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue