Skip to content

chore(site): upgrade msw to 2.0 #12597

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

Merged
merged 16 commits into from
Mar 19, 2024
Merged

chore(site): upgrade msw to 2.0 #12597

merged 16 commits into from
Mar 19, 2024

Conversation

BrunoQuaresma
Copy link
Collaborator

Closes #11426

@BrunoQuaresma BrunoQuaresma requested review from Parkreiner and a team March 14, 2024 15:06
@BrunoQuaresma BrunoQuaresma self-assigned this Mar 14, 2024
// TODO: This test is timing out after upgrade a few Jest dependencies
// and I was not able to figure out why. When running it specifically, I
// can see many act warnings that may can help us to find the issue.
"/usePaginatedQuery.test.ts",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Parkreiner I may need your help with this 🙏 I created a separated issue to not block this one #12598

Copy link
Member

Choose a reason for hiding this comment

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

No worries! Happy to take a look tomorrow after Backstage launch

Copy link
Member

Choose a reason for hiding this comment

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

rather than temporarily ignore the file, can we use test.failing on the tests in the file?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I didn't realize that was an option. Definitely think we should go with that

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For some reason, describe.skip or test.failure are not working 😢 it just hangs forever

Screen.Recording.2024-03-14.at.14.54.43.mov

Ps: I tried to post a longer video but GH didn't allow me because of the size.

Copy link
Member

Choose a reason for hiding this comment

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

that's annoying... what happens if you add an empty non-skipped test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it just hangs... I think there is some weird thing happening on this test 🤔

@@ -37,7 +37,7 @@ function render<
* There are a lot of test cases in this file. Scoping mocking to inner describe
* function calls to limit the cognitive load of maintaining all this stuff
*/
describe(usePaginatedQuery.name, () => {
describe.skip(usePaginatedQuery.name, () => {
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe you can just import skip?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let me see if that works

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

skip is not exported directly. It needs to be used with describe, test, or it but something is preventing this to be working properly. I think Kayla found a similar issues on this PR #12538

@BrunoQuaresma BrunoQuaresma requested a review from mtojek March 18, 2024 13:36
Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

Big fan of the cleaner API – thanks for handling the upgrade!

I think everything looks good enough to ship, but I did have one comment about a test case possibly relying too much on MSW implementation details

@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) March 18, 2024 14:18
@BrunoQuaresma BrunoQuaresma disabled auto-merge March 18, 2024 14:23
@BrunoQuaresma BrunoQuaresma merged commit 23e3e4c into main Mar 19, 2024
@BrunoQuaresma BrunoQuaresma deleted the bq/upgrade-msw branch March 19, 2024 12:30
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

upgrade msw
4 participants