Run a property-based test with an asynchronous test body.
Returns a Promise<void> that resolves when the test completes and rejects if any test case fails.
Promise<void>
Optional
import { test } from 'vitest';import * as hegel from 'hegel';import * as gs from 'hegel/generators';test('my async test', () => hegel.testAsync(async (tc) => { const x = tc.draw(gs.integers()); const result = await someAsyncOperation(x); expect(result).toEqual(expected(x)); }),); Copy
import { test } from 'vitest';import * as hegel from 'hegel';import * as gs from 'hegel/generators';test('my async test', () => hegel.testAsync(async (tc) => { const x = tc.draw(gs.integers()); const result = await someAsyncOperation(x); expect(result).toEqual(expected(x)); }),);
Run a property-based test with an asynchronous test body.
Returns a
Promise<void>that resolves when the test completes and rejects if any test case fails.