Fix jest when no pro access
This commit is contained in:
parent
d9d8243d4c
commit
7bd4c39929
|
@ -16,10 +16,15 @@ const baseConfig: Config.InitialProjectOptions = {
|
||||||
"@budibase/backend-core": "<rootDir>/../backend-core/src",
|
"@budibase/backend-core": "<rootDir>/../backend-core/src",
|
||||||
"@budibase/shared-core": "<rootDir>/../shared-core/src",
|
"@budibase/shared-core": "<rootDir>/../shared-core/src",
|
||||||
"@budibase/types": "<rootDir>/../types/src",
|
"@budibase/types": "<rootDir>/../types/src",
|
||||||
"@budibase/pro": "<rootDir>/../pro/packages/pro/src",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add pro sources if they exist
|
||||||
|
if (fs.existsSync("../pro/packages")) {
|
||||||
|
baseConfig.moduleNameMapper!["@budibase/pro"] =
|
||||||
|
"<rootDir>/../pro/packages/pro/src"
|
||||||
|
}
|
||||||
|
|
||||||
const config: Config.InitialOptions = {
|
const config: Config.InitialOptions = {
|
||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,9 +16,15 @@ const config: Config.InitialOptions = {
|
||||||
"@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",
|
||||||
"@budibase/pro/(.*)": "<rootDir>/../pro/packages/pro/$1",
|
|
||||||
"@budibase/pro": "<rootDir>/../pro/packages/pro/src",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add pro sources if they exist
|
||||||
|
if (fs.existsSync("../pro/packages")) {
|
||||||
|
config.moduleNameMapper!["@budibase/pro/(.*)"] =
|
||||||
|
"<rootDir>/../pro/packages/pro/$1"
|
||||||
|
config.moduleNameMapper!["@budibase/pro"] =
|
||||||
|
"<rootDir>/../pro/packages/pro/src"
|
||||||
|
}
|
||||||
|
|
||||||
export default config
|
export default config
|
||||||
|
|
Loading…
Reference in New Issue