Skip to content

Commit

Permalink
#99 add unit test system
Browse files Browse the repository at this point in the history
Signed-off-by: JAGFx <[email protected]>
  • Loading branch information
JAGFx committed Feb 22, 2022
1 parent e362e47 commit ae82f56
Show file tree
Hide file tree
Showing 6 changed files with 47,028 additions and 37,843 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ module.exports = {
'plugin:vue/essential',
'plugin:vue/strongly-recommended',
'plugin:vue/recommended',
'plugin:jest/recommended',
'prettier'
],
plugins: ['prettier'],
plugins: ['vue', 'html', 'prettier', 'jest'],
rules: {
'no-console': 1,
'no-debugger': 2,
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ yarn-error.log*
*.sln
*.sw?

logs/
logs/
coverage/
30 changes: 30 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/

module.exports = {
roots: [
'<rootDir>/src',
'<rootDir>/test',
'<rootDir>/lib',
'<rootDir>/servers'
],
clearMocks: true,
coverageDirectory: 'coverage',
collectCoverageFrom: [
'src/**/*.vue',
'src/**/*.js',
'!src/main.js',
'lib/**/*.js',
'!lib/sdk/',
'!lib/config/',
'servers/**/*.js',
'!node_modules/'
],
moduleFileExtensions: ['js', 'json', 'vue'],
transform: {
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': '@vue/vue2-jest'
}
};
Loading

0 comments on commit ae82f56

Please sign in to comment.