Skip to content

Commit

Permalink
Add Vue Test Utils (#72)
Browse files Browse the repository at this point in the history
The Vue Test Utils are "a set of utility functions aimed to simplify
testing Vue.js components". This package allows us to unit test 
the Vue components of Numberscope.

Also, adds complete examples of a Vue component test (SeqGetter.vue)
and of a Vue view (Home.vue). The tests may be run with `npm run test:vue`.
This works toward, but does not fully complete, a resolution of issue #25.
  • Loading branch information
liammulh authored Dec 20, 2021
1 parent 6199ac2 commit ac1f712
Show file tree
Hide file tree
Showing 7 changed files with 16,272 additions and 11,087 deletions.
13 changes: 12 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,16 @@ module.exports = {
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
}
]
}
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel'
}
Loading

0 comments on commit ac1f712

Please sign in to comment.