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

feat(es/testing): Use __swc_snapshots__ for test! macro #8191

Merged
merged 86 commits into from
Oct 30, 2023

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Oct 29, 2023

Description:

This implements something similar to __snapshots__ of jest. Instead of storing the expected result as a string literal, we now store it in $crate/tests/__snapshots__/$path_to_test__$test_name.js.

Related issue:

@kdy1 kdy1 added this to the Planned milestone Oct 29, 2023
@kdy1 kdy1 self-assigned this Oct 29, 2023
@kdy1 kdy1 changed the title feat(es/testing): Use _snapshot_ for test! macro feat(es/testing): Use __snapshots__ for test! macro Oct 29, 2023
Copy link
Member Author

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • testing

@kdy1 kdy1 changed the title feat(es/testing): Use __snapshots__ for test! macro feat(es/testing): Use __swc_snapshots__ for test! macro Oct 29, 2023
Copy link
Member Author

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • swc_ecma_transforms_testing

@kdy1 kdy1 marked this pull request as ready for review October 30, 2023 00:50
kodiakhq[bot]
kodiakhq bot previously approved these changes Oct 30, 2023
kodiakhq[bot]
kodiakhq bot previously approved these changes Oct 30, 2023
@kdy1 kdy1 enabled auto-merge (squash) October 30, 2023 00:58
@kdy1 kdy1 disabled auto-merge October 30, 2023 01:38
@kdy1 kdy1 merged commit 0aafa75 into swc-project:main Oct 30, 2023
141 checks passed
@kdy1 kdy1 deleted the fixture-skip branch October 30, 2023 01:39
@SevereCloud
Copy link

@kdy1

swc-bump:

  • swc_ecma_transforms_testing

Hi, it was breaking change. cargo update break fixture testing

@kdy1
Copy link
Member Author

kdy1 commented Oct 30, 2023

My bad

@kdy1 kdy1 modified the milestones: Planned, v1.3.96 Nov 3, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Migrate inlined fixture tests to file-based fixture tests
2 participants