diffplug / diffplug/selfie

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

Open
#513 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
101
Forks
18
PR merge metrics
No merged PRs in 30d

Description

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!".

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.