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',
testEnvironment: 'jest-environment-jsdom',
extensionsToTreatAsEsm: ['.ts'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
useESM: true
}
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.json',
useESM: true,
},
],
},
verbose: true,
testEnvironmentOptions: {
url: "http://localhost"
url: 'http://localhost',
},
moduleNameMapper: {
"^[./a-zA-Z0-9$_-]+\\.py$": "<rootDir>/__mocks__/fileMock.js",
}
};
'^[./a-zA-Z0-9$_-]+\\.py$': '<rootDir>/__mocks__/fileMock.js',
},
};