Skip to content

Commit

Permalink
Fix: Too many shrinks for commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz committed Dec 15, 2018
1 parent 0d66edf commit 30e4372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/check/model/commands/CommandsArbitrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class CommandsArbitrary<Model extends object, Real, RunResult> extends Arbitrary
const emptyOrNil = shrunkOnce
? Stream.nil<Shrinkable<CommandWrapper<Model, Real, RunResult>>[]>()
: new Stream([[]][Symbol.iterator]());
const size = this.lengthArb.shrinkableFor(items.length - 1, false);
const size = this.lengthArb.shrinkableFor(items.length - 1, shrunkOnce);

return emptyOrNil
.join(size.shrink().map(l => items.slice(0, l.value).concat(items[items.length - 1]))) // try: remove items except the last one
Expand Down

0 comments on commit 30e4372

Please sign in to comment.