From 77dcdc12e2934abc01835ba2b4209d2f3afdc24d Mon Sep 17 00:00:00 2001 From: Jan W Date: Thu, 3 Oct 2024 15:28:37 +0200 Subject: [PATCH] fix: spread --- src/jest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jest.js b/src/jest.js index f4312bd..ed1c9a5 100644 --- a/src/jest.js +++ b/src/jest.js @@ -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) @@ -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()