-
Notifications
You must be signed in to change notification settings - Fork 24
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
chore: Update pages/AccountSettings to Vitest #3227
Conversation
Bundle ReportChanges will increase total bundle size by 55 bytes ⬆️
|
Bundle ReportChanges will increase total bundle size by 55 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
const eyeIcon = await screen.findByRole('button', { | ||
name: /eye/, | ||
}) | ||
const eyeIcon = await screen.findByTestId('toggle-password') |
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.
nit: is this variable name and at line 155 still accurate/helpful now that we're not finding by "eye"?
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.
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(() => { |
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.
from my own curiosity: what's the thinking behind swapping this out in favor of adding to each test?
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.
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.
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.
LGTM
one extreme nit and one question.
Description
This PR updates all the tests within the
pages/AccountSettings
to Vitest