Renamings
This commit is contained in:
parent
c5b64b1714
commit
0679880b5b
|
@ -1,7 +1,7 @@
|
||||||
import { Config } from "@jest/types"
|
import { Config } from "@jest/types"
|
||||||
const preset = require("ts-jest/jest-preset")
|
const preset = require("ts-jest/jest-preset")
|
||||||
|
|
||||||
const testContainersSettings: Config.InitialProjectOptions = {
|
const baseConfig: Config.InitialProjectOptions = {
|
||||||
...preset,
|
...preset,
|
||||||
preset: "@trendyol/jest-testcontainers",
|
preset: "@trendyol/jest-testcontainers",
|
||||||
setupFiles: ["./tests/jestEnv.ts"],
|
setupFiles: ["./tests/jestEnv.ts"],
|
||||||
|
@ -13,7 +13,7 @@ const testContainersSettings: Config.InitialProjectOptions = {
|
||||||
|
|
||||||
if (!process.env.CI) {
|
if (!process.env.CI) {
|
||||||
// use sources when not in CI
|
// use sources when not in CI
|
||||||
testContainersSettings.moduleNameMapper = {
|
baseConfig.moduleNameMapper = {
|
||||||
"@budibase/types": "<rootDir>/../types/src",
|
"@budibase/types": "<rootDir>/../types/src",
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -23,13 +23,13 @@ if (!process.env.CI) {
|
||||||
const config: Config.InitialOptions = {
|
const config: Config.InitialOptions = {
|
||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
...testContainersSettings,
|
...baseConfig,
|
||||||
displayName: "sequential test",
|
displayName: "sequential test",
|
||||||
testMatch: ["<rootDir>/**/*.seq.spec.[jt]s"],
|
testMatch: ["<rootDir>/**/*.seq.spec.[jt]s"],
|
||||||
runner: "jest-serial-runner",
|
runner: "jest-serial-runner",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...testContainersSettings,
|
...baseConfig,
|
||||||
testMatch: ["<rootDir>/**/!(*.seq).spec.[jt]s"],
|
testMatch: ["<rootDir>/**/!(*.seq).spec.[jt]s"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Config } from "@jest/types"
|
||||||
import * as fs from "fs"
|
import * as fs from "fs"
|
||||||
const preset = require("ts-jest/jest-preset")
|
const preset = require("ts-jest/jest-preset")
|
||||||
|
|
||||||
const testContainersSettings: Config.InitialProjectOptions = {
|
const baseConfig: Config.InitialProjectOptions = {
|
||||||
...preset,
|
...preset,
|
||||||
preset: "@trendyol/jest-testcontainers",
|
preset: "@trendyol/jest-testcontainers",
|
||||||
setupFiles: ["./src/tests/jestEnv.ts"],
|
setupFiles: ["./src/tests/jestEnv.ts"],
|
||||||
|
@ -15,14 +15,14 @@ const testContainersSettings: Config.InitialProjectOptions = {
|
||||||
|
|
||||||
if (!process.env.CI) {
|
if (!process.env.CI) {
|
||||||
// use sources when not in CI
|
// use sources when not in CI
|
||||||
testContainersSettings.moduleNameMapper = {
|
baseConfig.moduleNameMapper = {
|
||||||
"@budibase/backend-core/(.*)": "<rootDir>/../backend-core/$1",
|
"@budibase/backend-core/(.*)": "<rootDir>/../backend-core/$1",
|
||||||
"@budibase/backend-core": "<rootDir>/../backend-core/src",
|
"@budibase/backend-core": "<rootDir>/../backend-core/src",
|
||||||
"@budibase/types": "<rootDir>/../types/src",
|
"@budibase/types": "<rootDir>/../types/src",
|
||||||
}
|
}
|
||||||
// add pro sources if they exist
|
// add pro sources if they exist
|
||||||
if (fs.existsSync("../../../budibase-pro")) {
|
if (fs.existsSync("../../../budibase-pro")) {
|
||||||
testContainersSettings.moduleNameMapper["@budibase/pro"] =
|
baseConfig.moduleNameMapper["@budibase/pro"] =
|
||||||
"<rootDir>/../../../budibase-pro/packages/pro/src"
|
"<rootDir>/../../../budibase-pro/packages/pro/src"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -32,13 +32,13 @@ if (!process.env.CI) {
|
||||||
const config: Config.InitialOptions = {
|
const config: Config.InitialOptions = {
|
||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
...testContainersSettings,
|
...baseConfig,
|
||||||
displayName: "sequential test",
|
displayName: "sequential test",
|
||||||
testMatch: ["<rootDir>/**/*.seq.spec.[jt]s"],
|
testMatch: ["<rootDir>/**/*.seq.spec.[jt]s"],
|
||||||
runner: "jest-serial-runner",
|
runner: "jest-serial-runner",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...testContainersSettings,
|
...baseConfig,
|
||||||
testMatch: ["<rootDir>/**/!(*.seq).spec.[jt]s"],
|
testMatch: ["<rootDir>/**/!(*.seq).spec.[jt]s"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue