-
Notifications
You must be signed in to change notification settings - Fork 100
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
add jest + react-testing library with example and docs guide #1246
Conversation
Preview URL: https://1246--preview-instui.netlify.app |
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.
looking good, just some smaller issues
packages/ui-avatar/package.json
Outdated
@@ -34,11 +34,14 @@ | |||
"prop-types": "^15.8.1" | |||
}, | |||
"devDependencies": { | |||
"@instructure/ui-axe-check": "workspace:^", |
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.
We should use here exact dependency numbers like with other internal references
preset: 'ts-jest', | ||
testEnvironment: 'jsdom', | ||
testMatch: ['**/__new-tests__/**/*.test.tsx'] | ||
} |
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.
We should calculate test coverage too (and later fail the build if its below 80%)
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.
I've added the coverage threshold to the config. Once we are ready, we can add the --coverage
flag to the script and it should work.
14cc9c2
to
90e5b92
Compare
…ting library and convert ui-avatar tests
1d7777f
to
88c775d
Compare
INSTUI-3818
ui-avatar
tests as example and skip old onestest plan
yarn test:new
-> all 26 should passui-avatar
tests withnpx ui-scripts test --path packages/ui-avatar
-> all 26 should be skipped (not including the theme related ones)