2023-02-04 08:07:41 +13:00
|
|
|
import { Config } from "@jest/types"
|
2022-11-15 02:29:46 +13:00
|
|
|
|
2023-02-04 08:08:45 +13:00
|
|
|
const baseConfig: Config.InitialProjectOptions = {
|
2023-01-28 00:43:36 +13:00
|
|
|
setupFiles: ["./tests/jestEnv.ts"],
|
2024-03-26 22:51:10 +13:00
|
|
|
globalSetup: "./../../globalSetup.ts",
|
|
|
|
globalTeardown: "./../../globalTeardown.ts",
|
2023-01-28 00:43:36 +13:00
|
|
|
setupFilesAfterEnv: ["./tests/jestSetup.ts"],
|
2023-01-11 22:37:37 +13:00
|
|
|
transform: {
|
|
|
|
"^.+\\.ts?$": "@swc/jest",
|
|
|
|
},
|
2023-02-22 06:13:24 +13:00
|
|
|
moduleNameMapper: {
|
2023-02-02 00:02:29 +13:00
|
|
|
"@budibase/types": "<rootDir>/../types/src",
|
2023-08-02 19:59:14 +12:00
|
|
|
"@budibase/shared-core": ["<rootDir>/../shared-core/src"],
|
2023-02-22 06:13:24 +13:00
|
|
|
},
|
2023-02-02 00:02:29 +13:00
|
|
|
}
|
|
|
|
|
2023-02-04 08:07:41 +13:00
|
|
|
const config: Config.InitialOptions = {
|
2023-01-31 02:35:09 +13:00
|
|
|
projects: [
|
|
|
|
{
|
2023-02-04 08:08:45 +13:00
|
|
|
...baseConfig,
|
2023-01-31 02:35:09 +13:00
|
|
|
displayName: "sequential test",
|
|
|
|
testMatch: ["<rootDir>/**/*.seq.spec.[jt]s"],
|
|
|
|
runner: "jest-serial-runner",
|
|
|
|
},
|
|
|
|
{
|
2023-02-04 08:08:45 +13:00
|
|
|
...baseConfig,
|
2023-01-31 02:35:09 +13:00
|
|
|
testMatch: ["<rootDir>/**/!(*.seq).spec.[jt]s"],
|
|
|
|
},
|
|
|
|
],
|
2023-02-01 23:57:05 +13:00
|
|
|
collectCoverageFrom: ["src/**/*.{js,ts}"],
|
|
|
|
coverageReporters: ["lcov", "json", "clover"],
|
|
|
|
}
|
|
|
|
|
2023-06-20 05:28:38 +12:00
|
|
|
process.env.DISABLE_PINO_LOGGER = "1"
|
|
|
|
|
2022-11-15 02:29:46 +13:00
|
|
|
export default config
|