Simplify arrow function syntax in unit test

This commit is contained in:
2026-01-28 22:16:38 +00:00
parent 26ff87450e
commit 6dfe06a412

View File

@@ -164,7 +164,7 @@ describe('useAsyncState', () => {
it('should cancel ongoing operation when reset', async () => { it('should cancel ongoing operation when reset', async () => {
const { execute, reset, loading } = useAsyncState(); const { execute, reset, loading } = useAsyncState();
const asyncFn = vi.fn(async (signal) => { const asyncFn = vi.fn(async signal => {
await new Promise(resolve => setTimeout(resolve, 100)); await new Promise(resolve => setTimeout(resolve, 100));
if (signal?.aborted) throw new Error('Aborted'); if (signal?.aborted) throw new Error('Aborted');
return 'Success'; return 'Success';