Migrate the Jest config (#873)

* Migrate the Jest config

* Run Prettier
This commit is contained in:
woxtu
2022-10-21 23:05:14 +09:00
committed by GitHub
parent 5341a0be4a
commit aa85f5f596

View File

@@ -3,17 +3,20 @@ module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom', testEnvironment: 'jest-environment-jsdom',
extensionsToTreatAsEsm: ['.ts'], extensionsToTreatAsEsm: ['.ts'],
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': [
tsconfig: 'tsconfig.json', 'ts-jest',
useESM: true {
} tsconfig: 'tsconfig.json',
useESM: true,
},
],
}, },
verbose: true, verbose: true,
testEnvironmentOptions: { testEnvironmentOptions: {
url: "http://localhost" url: 'http://localhost',
}, },
moduleNameMapper: { moduleNameMapper: {
"^[./a-zA-Z0-9$_-]+\\.py$": "<rootDir>/__mocks__/fileMock.js", '^[./a-zA-Z0-9$_-]+\\.py$': '<rootDir>/__mocks__/fileMock.js',
} },
}; };