-
Notifications
You must be signed in to change notification settings - Fork 33
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
Use vitest instead of react-scripts for tests #621
Conversation
Demo starting at https://lxd-ui-621.demos.haus |
vitest.config.ts
Outdated
@@ -0,0 +1,7 @@ | |||
import { defineConfig } from "vitest/config"; | |||
|
|||
export default defineConfig({ |
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.
should we set the globals
config so that we don't have to import test functions everywhere similar to jest?
// vitest.config.ts
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
globals: true,
},
})
If we set this, then we just need to add this to tsconfig.json
as well:
// tsconfig.json
{
"compilerOptions": {
"types": ["vitest/globals"]
}
}
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.
Good idea, will change it :)
LGTM. Just wondering if we should make vitest API imports global? Feel free to leave it as is. |
3e0e143
to
1ffd11e
Compare
Signed-off-by: David Edler <david.edler@canonical.com>
Done
QA