Run a property-based test.
If your property is async, see testAsync instead.
Optional
import { test } from 'vitest';import * as hegel from 'hegel';import * as gs from 'hegel/generators';test('addition is commutative', () => hegel.test((tc) => { const x = tc.draw(gs.integers()); const y = tc.draw(gs.integers()); expect(x + y).toBe(y + x); }),); Copy
import { test } from 'vitest';import * as hegel from 'hegel';import * as gs from 'hegel/generators';test('addition is commutative', () => hegel.test((tc) => { const x = tc.draw(gs.integers()); const y = tc.draw(gs.integers()); expect(x + y).toBe(y + x); }),);
Run a property-based test.
If your property is async, see testAsync instead.