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

refactor(testing): remove unnecessary context processing in snapshot teardown #3422

Merged
merged 4 commits into from
Jun 7, 2023

Conversation

@wafuwafu13 wafuwafu13 requested a review from kt3k as a code owner June 3, 2023 17:50
Comment on lines +565 to +567
await assertSnapshot(t, formatTestOutput(result1.output), {
name: "Snapshot Test - Different Dir - New snapshot",
});
Copy link
Member

Choose a reason for hiding this comment

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

I think this assertion is enough for checking this change isn't breaking things. Can you remove the rest of assertions and reduce the new snapshots?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed e7853d1

@kt3k
Copy link
Member

kt3k commented Jun 5, 2023

This contexts length is always 1 because teardown is only called once in a context.

I think contexts.length is at most 1 because each test file is run in different worker (since v1.10.0 of CLI). ref: (denoland/deno#9815 , https://deno.com/blog/v1.10#improvements-to-deno-test )

@wafuwafu13 wafuwafu13 requested a review from kt3k June 6, 2023 20:18
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM

@kt3k kt3k merged commit d42db5b into denoland:main Jun 7, 2023
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.

2 participants