Skip to content

Commit 6eaa1f1

Browse files
authored
docs: add warning to SkipNow about mutation (#83)
1 parent 7adc026 commit 6eaa1f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

engine.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,11 @@ func (t *T) Skip(args ...any) {
711711
// If too many test cases are skipped, rapid will mark the test as failing
712712
// due to inability to generate enough valid test cases.
713713
//
714+
// The test case or action will be treated like it had never been drawn
715+
// and will not be shown in test logs.
716+
// Therefore, to avoid confusing test failures later on,
717+
// [SkipNow] must not be called after the action has already mutated shared state.
718+
//
714719
// Prefer *Generator.Filter to SkipNow, and prefer generators that always produce
715720
// valid test cases to Filter.
716721
func (t *T) SkipNow() {

0 commit comments

Comments
 (0)