-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade testing suite to support DOM testing #1322
Conversation
'ts-jest': { | ||
isolatedModules: true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ts jest is slow. this speeds it up
@@ -8,7 +8,7 @@ | |||
"scripts": { | |||
"serve": "vue-cli-service serve", | |||
"build": "vue-cli-service build", | |||
"test:unit": "vue-cli-service test:unit --passWithNoTests", | |||
"test:unit": "vue-cli-service test:unit --cache --passWithNoTests --runInBand", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--runInBand and --cache to speed up ts-jest too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. A little concerned about the lock diff. I'll defer to @timjrobinson's review since he has worked the most with our existing test suite.
Description
Currently we don't have proper utils for testing DOM behaviour. A part of proper testing practice of the UI is to test what the users 'actually see' rather than the implementation details of what goes on behind the scenes.
So we test behaviour rather than implementation.
@testing-library/vue
adds a bunch of helpful buddies which make testing our component outputs a squeezy breeze.Unfortunately, for vue3 support we had to rely on the
@next
branch for above library which meant that we needed to upgrade a bunch of our existing test packages.Type of change
How should this be tested?
Should be able to run unit tests as was before
Visual context
CLI usage. No visual context applicable.
Checklist:
master
if hotfix,develop
if not