Skip to content

Commit

Permalink
test: 增加测试配置
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Aug 12, 2020
1 parent 019e9cb commit 5edd76c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.idea/

# js
/node_modules/
/dist/
/coverage/
/yarn.lock
/yarn-error.log
13 changes: 11 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
module.exports = {
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
"^.+\\.(js|jsx)$": "babel-jest",
'^.+\\.ts?$': 'ts-jest',
"^.+\\.jsx?$": "babel-jest"
},
testEnvironment: 'jsdom',
testTimeout: 10000,
// Allow /node_modules/ for CI testing
"transformIgnorePatterns": [],
// Fix TypeError: Unable to require `.d.ts` file.
// https://github.com/kulshekhar/ts-jest/issues/950
globals: {
'ts-jest': {
isolatedModules: true
},
}
};
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,14 @@
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"babel-preset-miaoxing": "^0.1.3",
"miaoxing-coding-standards": "^5.3.1",
"ts-jest": "^26.2.0"
},
"dependencies": {
"@mxjs/app": "^0.1.1",
"query-string": "^6.13.1"
}
}

0 comments on commit 5edd76c

Please sign in to comment.