Skip to content

Commit

Permalink
⚡️ Faster replay: drop loose compare (#4345)
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz authored Nov 9, 2023
1 parent be9f8ef commit 4622792
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .yarn/versions/cafd3d23.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
releases:
fast-check: patch

declined:
- "@fast-check/ava"
- "@fast-check/jest"
- "@fast-check/vitest"
- "@fast-check/worker"
2 changes: 1 addition & 1 deletion packages/fast-check/src/check/runner/utils/PathWalker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function pathWalk<Ts>(
let values: Stream<Value<Ts>> = producers.drop(segments[0]).map(produce);
for (const s of segments.slice(1)) {
const valueToShrink = values.getNthOrLast(0);
if (valueToShrink == null) {
if (valueToShrink === null) {
throw new Error(`Unable to replay, got wrong path=${path}`);
}
values = shrink(valueToShrink).drop(s);
Expand Down

0 comments on commit 4622792

Please sign in to comment.