Skip to content

Commit

Permalink
Added test library, adapted project for unit tests and created test f…
Browse files Browse the repository at this point in the history
…or Calendar component #27

- Added test library
- Adapted DateTime and Translation Services to tests
- Created tests for Calendar.vue
- Fixed some issues in Calendar
  • Loading branch information
SashkaHavr committed Jan 7, 2022
1 parent c354453 commit 5246017
Show file tree
Hide file tree
Showing 13 changed files with 16,608 additions and 10,239 deletions.
18 changes: 17 additions & 1 deletion ui/web/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
module.exports = {
root: true,

env: {
node: true
},

'extends': [
'plugin:vue/vue3-strongly-recommended',
'eslint:recommended',
'@vue/typescript/recommended'
],

parserOptions: {
parser: "@typescript-eslint/parser",
ecmaVersion: 2020,
ecmaFeatures : {
jsx : false
}
},

rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
Expand Down Expand Up @@ -92,5 +96,17 @@ module.exports = {
"comma-spacing": "warn",
"eol-last": "warn",
"func-call-spacing": "warn",
}
},

overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
}
]
}
2 changes: 2 additions & 0 deletions ui/web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?

/tests/unit/__snapshots__
7 changes: 7 additions & 0 deletions ui/web/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
transform: {
'^.+\\.vue$': 'vue-jest'
},
setupFiles: ['./tests/unit/config.ts']
}
Loading

0 comments on commit 5246017

Please sign in to comment.