Skip to content

Commit

Permalink
fix: spread
Browse files Browse the repository at this point in the history
  • Loading branch information
sparten11740 committed Oct 3, 2024
1 parent e48d045 commit 77dcdc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const eachCallerLocation = []
const makeEach =
(impl) =>
(list, ...rest) =>
(template, fn, timeout) => {
(template, fn, ...restArgs) => {
eachCallerLocation.unshift(getCallerLocation())
// Hack for common testing with simple arrow functions, until we can disable esbuild minification
const formatArg = (x) => (x && x instanceof Function && `${x}` === '()=>{}' ? '() => {}' : x)
Expand Down Expand Up @@ -86,7 +86,7 @@ const makeEach =
if (length > 0) name = utilFormat(name, ...args.slice(0, length).map(formatArg))
}

impl(name, () => (Array.isArray(args) ? fn(...args) : fn(args)), timeout)
impl(name, () => (Array.isArray(args) ? fn(...args) : fn(args)), ...restArgs)
}

eachCallerLocation.shift()
Expand Down

0 comments on commit 77dcdc1

Please sign in to comment.