Skip to content

Commit

Permalink
fix test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ChALkeR committed Jul 18, 2024
1 parent 8d6b072 commit 3774271
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 @@ -117,8 +117,8 @@ const describe = (...args) => {
const testRaw = (callerLocation, testBase, name, fn, testTimeout) => {
const timeout = testTimeout ?? defaultTimeout
installLocationInNextTest(callerLocation)
if (fn.length > 0) return testBase(name, (t, c) => fn(c))
if (!forceExit) return testBase(name, fn)
if (fn.length > 0) return testBase(name, { timeout }, (t, c) => fn(c))
if (!forceExit) return testBase(name, { timeout }, fn)
return testBase(name, { timeout }, async (t) => {
const res = fn()
assert(
Expand Down

0 comments on commit 3774271

Please sign in to comment.