-
Notifications
You must be signed in to change notification settings - Fork 26
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
#234 Upgrade Vitest libraries to latest version #235
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -4,9 +4,9 @@ import { defineConfig, UserConfig } from "vitest/config"; | |||
export default defineConfig({ | |||
plugins: [react()], | |||
test: { | |||
exclude: ["e2e/**"], | |||
exclude: ["e2e/**", "node_modules/**"], |
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 noticed that the vitest
command runs tests in node_modules
if any exist, that's why I'm excluding this folder here.
"@testing-library/react": "^16.0.0", | ||
"@types/node": "^20", | ||
"@types/ramda": "^0.30.1", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@vitejs/plugin-react": "^4.1.0", | ||
"@vitest/coverage-v8": "0.34.2", | ||
"@vitest/coverage-v8": "^2.0.5", | ||
"@vitest/ui": "^2.0.5", |
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 added this package so that we can use the Vitest UI if we want with the yarn test:ui
script.
@@ -58,7 +58,7 @@ describe("connectionForm", () => { | |||
).toBeInTheDocument(); | |||
|
|||
expect(screen.getByTestId("icon-test-inactive")).toBeInTheDocument(); | |||
expect(screen.getByText("Save")).toBeInTheDocument(); | |||
expect(screen.getByTestId("connection-save")).toBeInTheDocument(); |
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.
More tests started failing after the latest rebase. Probably something in @testing-library/*
or @mantine/*
changed in a patch version, but I haven't dug into this further.
Hi, @brunomenezes , I checked the issue with the reduced test coverage. From the looks of it, we are covering the same files with the inclusion of For those files the reporter is giving a 100% coverage though, so they are not bringing down the coverage. Between this branch and the Here's a screenshot: The only difference I noticed was that the individual imports are not marked with So, it appears that the reporter is giving different results for the same file contents. I also tried a different reporter - @vitest/coverage-istanbul but with it, the coverage fell even more - https://coveralls.io/builds/69600513. Additionally, I checked vitest's repo for any related issues. I found this one and applied the suggested solution with So, I think we can either ignore the failed coveralls check for this PR and merge it like this with this new test coverage result or I can add more unit tests to prevent the decrease of test coverage. |
@nevendyulgerov, that is alright. As we discussed, they changed a bit about how mapping works. That becomes the new threshold, and we will work from here. |
I upgraded Vitest related packages to their latest versions and applied a couple of fixes for issues I noticed after the upgrade.