Respect base url when loading config.json (#274)

* Respect base url when loading config.json

* update readme
This commit is contained in:
Aine
2025-01-09 22:36:45 +02:00
committed by GitHub
parent e66c321ef9
commit ddf3298b41
5 changed files with 34 additions and 3 deletions

View File

@@ -9,5 +9,23 @@ const config: JestConfigWithTsJest = {
coverageReporters: ["html", "text", "text-summary", "cobertura"],
extensionsToTreatAsEsm: [".ts", ".tsx"],
setupFilesAfterEnv: ["<rootDir>/src/jest.setup.ts"],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
diagnostics: {
ignoreCodes: [1343]
},
astTransformers: {
before: [
{
path: 'ts-jest-mock-import-meta',
options: { metaObjectReplacement: { env: { BASE_URL: "/" } } }
}
]
}
}
]
}
};
export default config;