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

[WIP] Implement new "standalone" snapshots. #14380

Closed
wants to merge 1 commit into from

Conversation

seansfkelley
Copy link

@seansfkelley seansfkelley commented Aug 1, 2023

Summary

#6383 (comment)

(More detail coming later.)

Test plan

TODO

  • How to name the standalone directory? Currently the PR just tacks .standalone onto the end.
    • Originally I wanted the standalone name to be the snapshot name minus .snap, but this meshes awkwardly with the resolveSnapshotPath API.
  • Existing snapshots are versioned. An explicit goal of standalone snapshots is that they don't have any of the Jest export/comment metadata, since they should be legal files in whatever language they're serialized as. Should these be versioned?
  • It is an explicit goal that users can provide an arbitrary extension that comes last on the standalone snapshot's file name so that other tools can infer the proper file type based on the file name. How does Jest know which files in the standalone directory are snapshots, and which are not?
    • Currently, the heuristic just looks for .snap in the filename. This seems too lax.
    • Even if users don't intend to put other files in these directories, some of their actions can cause files to appear there (.DS_Store comes to mind on macOS).
  • Bikeshed: I renamed the old snapshots (internally) to "grouped" and the new ones are called "standalone".

@linux-foundation-easycla
Copy link

CLA Not Signed

@netlify
Copy link

netlify bot commented Aug 1, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ffaaa2d
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/64c9947e82c869000756b719
😎 Deploy Preview https://deploy-preview-14380--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Aug 1, 2024

This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Aug 1, 2024
Copy link

This PR was closed because it has been stalled for 30 days with no activity. Please open a new PR if the issue is still relevant, linking to this one.

@github-actions github-actions bot closed this Aug 31, 2024
Copy link

github-actions bot commented Oct 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant