Chore/unit test (#538)

* chore: add unit test

* chore: add github action for unit test
This commit is contained in:
zuomeng wang
2022-11-29 18:15:43 +00:00
committed by GitHub
parent 5eb7830c13
commit f10237d207
7 changed files with 1915 additions and 78 deletions
+19
View File
@@ -0,0 +1,19 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
projects: ['<rootDir>/packages/app'],
preset: 'ts-jest',
testEnvironment: 'node',
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
},
],
},
};