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

User modifies test code while it is running, which jams the inline snapshot #513

Open
nedtwigg opened this issue Jan 9, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@nedtwigg
Copy link
Member

nedtwigg commented Jan 9, 2025

  1. there is testcode
  2. then it gets compiled
  3. then the test starts running
  4. when the test completes, Selfie modifies the testcode

When selfie modifies test code, it doesn't blindly trust line numbers. It parses the literal which is present, and makes sure that it matches the value it expected before replacing it with a new value.

But just the same, all it can do right now is throw an error, and it takes all the blame. If the user modifies files between 2 and 3, there's not much we can do about it. But if the modification happens between 3 and 4, we should be able to say "hey don't do that!".

@nedtwigg nedtwigg added the enhancement New feature or request label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant