import { test } from 'vitest';
import * as hegel from '@hegeldev/hegel';
import * as gs from '@hegeldev/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.