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

📝 Documentation: Explain how to work with end-to-end migration test snapshots #1141

Closed
2 tasks done
JoshuaKGoldberg opened this issue Dec 30, 2023 · 2 comments · Fixed by #1187
Closed
2 tasks done
Assignees
Labels
area: documentation Improvements or additions to docs status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Dec 30, 2023

Bug Report Checklist

Overview

Following #1048, I'll want to update the development docs on how to read and write snapshots when code does change. Two cases come to mind:

  • Unexpected snapshot change: briefly explaining what they are and why they're yelling at you
  • Expected snapshot change: briefly explaining running pnpm run test:migrate -u

Additional Info

This is an expected followup from the PR 🙂 and was generally a good thing to do even before. I've been meaning to file this issue for a while.

@JoshuaKGoldberg JoshuaKGoldberg added area: documentation Improvements or additions to docs status: accepting prs Please, send a pull request to resolve this! labels Dec 30, 2023
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Dec 30, 2023
@JoshuaKGoldberg JoshuaKGoldberg added the type: feature New enhancement or request label Dec 30, 2023
@JoshuaKGoldberg
Copy link
Owner Author

Really quickly, my flow for updating has been:

  1. Commit any changes
  2. pnpm i; pnpm build; pnpm test:migrate -u
  3. At this point there will be some files changed:
    • script/__snapshots__/migrate-test-e2e.js.snap will have updates if any files mismatched templates
    • The actual updated files on disk will be there too

@JoshuaKGoldberg JoshuaKGoldberg changed the title 📝 Documentation: Explain how to work with end-to-end test snapshots 📝 Documentation: Explain how to work with end-to-end migration test snapshots Jan 3, 2024
JoshuaKGoldberg added a commit that referenced this issue Jan 4, 2024
## PR Checklist

- [x] Addresses an existing open issue: fixes #1141; fixes #1186
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Adds some inline comments to end-to-end tests, as well as a more full
description of what to do with migration snapshots in development docs.
Also simplifies the migration test error to suggest looking at the docs.

Touches a little bit on what #1045 requests around more clear and
standardized token docs.

Co-authored-by: John Reilly <[email protected]>
Co-authored-by: Mohammad Bagher Abiyat <[email protected]>
Copy link

github-actions bot commented Jan 6, 2024

🎉 This is included in version v1.52.7 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Improvements or additions to docs status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant