Skip to content
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

chore: Update pages/AccountSettings to Vitest #3227

Merged
merged 30 commits into from
Sep 23, 2024

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR updates all the tests within the pages/AccountSettings to Vitest

@codecov-staging
Copy link

Bundle Report

Changes will increase total bundle size by 55 bytes ⬆️

Bundle name Size Change
gazebo-staging-array-push 6.0MB 55 bytes ⬆️

Copy link

codecov bot commented Sep 20, 2024

Bundle Report

Changes will increase total bundle size by 55 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-array-push 6.0MB 55 bytes (0.0%) ⬆️

@codecov-releaser
Copy link
Contributor

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
136a100 Fri, 20 Sep 2024 15:47:58 GMT Cloud Enterprise

const eyeIcon = await screen.findByRole('button', {
name: /eye/,
})
const eyeIcon = await screen.findByTestId('toggle-password')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is this variable name and at line 155 still accurate/helpful now that we're not finding by "eye"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, just reached the next file. The eye is still in there. Oh well, feel free to just leave as is

})
)

return { addNotification, mutate, user }
}

describe('renders component', () => {
beforeEach(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my own curiosity: what's the thinking behind swapping this out in favor of adding to each test?

Copy link
Contributor Author

@nicholas-codecov nicholas-codecov Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So imo this gives us better overall control for each individual test, and narrows down potential issues with test setups. It also makes it easier to grab mocks or user events that we setup in the setup functions as well, and future proofs it for any of those cases.

Copy link
Contributor

@calvin-codecov calvin-codecov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

one extreme nit and one question.

@nicholas-codecov nicholas-codecov added this pull request to the merge queue Sep 23, 2024
Merged via the queue into main with commit a22d678 Sep 23, 2024
59 of 63 checks passed
@nicholas-codecov nicholas-codecov deleted the chore-update-pages-account-settings-to-vitest branch September 23, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants