In SvelteKit, all the asynchronous tests below do not work at all.
kpouters opened this issue · 1 comments
kpouters commented
test.memo(
"username",
"Username already taken",
() => doesUserExist(data.username),
[data.username]
);
test('username', 'Username already taken', async () => {
await doesUserExist(data.username);
});
test('name', 'I always fail', () => Promise.reject());
ealush commented
Hey @kpouters, can you share a repro?
Usually, this is due to not applying done()
following the async tests: https://vestjs.dev/docs/writing_your_suite/accessing_the_result#done
Here's a svelte example: https://codesandbox.io/s/svelte-vest-5-imnq9z?file=/Form.svelte