Skip to content

Commit

Permalink
fix: rabin tests parsing config incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
Gozala committed Mar 9, 2022
1 parent 9afb665 commit b2f36da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,15 @@ const parseChunker = input => {
const size = parseInt(input.slice("size-".length).trim())
return FixedSize.withMaxChunkSize(size)
} else if (input.startsWith("rabin-")) {
const [min, avg, max] = input
const params = input
.slice("rabin-".length)
.split("-")
.map(n => parseInt(n))

const [min, avg, max] =
/** @type {[undefined|number, number, undefined|number]} */
(params.length === 1 ? [undefined, ...params] : params)

return Rabin.create(
Rabin.configure({
avg,
Expand Down

0 comments on commit b2f36da

Please sign in to comment.