35 lines
834 B
TypeScript
35 lines
834 B
TypeScript
import { Config } from "@jest/types"
|
|
const preset = require("ts-jest/jest-preset")
|
|
|
|
const baseConfig: Config.InitialProjectOptions = {
|
|
...preset,
|
|
preset: "@trendyol/jest-testcontainers",
|
|
setupFiles: ["./tests/jestEnv.ts"],
|
|
setupFilesAfterEnv: ["./tests/jestSetup.ts"],
|
|
transform: {
|
|
"^.+\\.ts?$": "@swc/jest",
|
|
},
|
|
moduleNameMapper: {
|
|
"@budibase/types": "<rootDir>/../types/src",
|
|
},
|
|
}
|
|
|
|
const config: Config.InitialOptions = {
|
|
projects: [
|
|
{
|
|
...baseConfig,
|
|
displayName: "sequential test",
|
|
testMatch: ["<rootDir>/**/*.seq.spec.[jt]s"],
|
|
runner: "jest-serial-runner",
|
|
},
|
|
{
|
|
...baseConfig,
|
|
testMatch: ["<rootDir>/**/!(*.seq).spec.[jt]s"],
|
|
},
|
|
],
|
|
collectCoverageFrom: ["src/**/*.{js,ts}"],
|
|
coverageReporters: ["lcov", "json", "clover"],
|
|
}
|
|
|
|
export default config
|