Jest async test using done
callback syntax doesn't work with autoPreview: true
#314
Labels
bug
Something isn't working
Describe the bug
When
jest-preview
'sautoPreview: true
:Using Jest's
done
callback syntax to write an asynchronous test (Jest documentation), the test fails becausedone
isundefined
.With
autoPreview: false
, there is no issue.Screenshots
Reproduce
Forked the official jest-preview stackblitz demo, then used the
done
async syntax inApp.test.tsx
, and the bug appears.Repro: https://stackblitz.com/edit/jest-preview-zfv89j?file=src%2FApp.test.tsx
Expected behavior
With
autoPreview: true
,done
callback should be defined, and will end the test when called.Environment (please complete the following information)
Additional context
The issue feels like it's around where the Jest
it
function is patched forautoPreview
, here:jest-preview/src/configure.ts
Lines 80 to 102 in 880630f
The text was updated successfully, but these errors were encountered: