Skip to content

Commit

Permalink
Update packages/fast-check/src/arbitrary/fuzzedString.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz authored Jun 27, 2023
1 parent 021223d commit 36d789d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/fast-check/src/arbitrary/fuzzedString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ type TransitionMap = Map<string | typeof startSymbol, Map<string | typeof endSym

function multiFromToSingleFrom(fromMulti: (string | typeof startSymbol)[]): string | typeof startSymbol {
const nonStart = fromMulti.filter((i) => i !== startSymbol) as string[];
if (nonStart.length === 0) {
return startSymbol;
}
return nonStart.join('');
const startCount = fromMulti.length - nonStart.length;
return startCount + ':' + nonStart.join('');
}

function incrementInTransitionMap(
Expand Down

0 comments on commit 36d789d

Please sign in to comment.