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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
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.

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.

None yet

1 participant