import { t, typeAsserts } from '../../index'; describe('symbol', () => { it('null', () => { expect.hasAssertions(); const schema = t.symbol(); expect(schema.validate(Symbol.for('mocked'))).toBe(true); expect(() => { typeAsserts(schema, Symbol.for('mocked')); }).not.toThrow(); }); it('symbol optional', () => { expect.hasAssertions(); const schema = t.symbol().optional(); expect(schema.validate(undefined)).toBe(true); expect(() => { typeAsserts(schema, undefined); }).not.toThrow(); }); });