@hegeldev/hegel
    Preparing search index...

    Function test

    • Run a property-based test.

      If your property is async, see testAsync instead.

      Parameters

      Returns void

      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);
      }),
      );