fix: run test by jest (#891)

(cherry picked from commit 06f4bfb6d7)
This commit is contained in:
ChengLei Shao 2022-10-11 22:30:42 +08:00 committed by chenos
parent f6add23da5
commit d5d3e4fb96

View File

@ -8,6 +8,7 @@ module.exports = {
testEnvironment: 'jsdom',
preset: 'ts-jest',
testMatch: ['**/__tests__/**/*.test.[jt]s?(x)'],
setupFiles: ['dotenv/config'],
setupFilesAfterEnv: [require.resolve('jest-dom/extend-expect'), './jest.setup.ts'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',