diff --git a/src/semigroup.ts b/src/semigroup.ts index d872f44..f62ecdf 100644 --- a/src/semigroup.ts +++ b/src/semigroup.ts @@ -63,7 +63,6 @@ const go = (ast: AST.AST): Semigroup => { } case "Tuple": { - // TODO: Use rest elements const els = ast.elements.map((e) => go(e.type)) const rest = ast.rest diff --git a/tests/empty.test.ts b/tests/empty.test.ts index 93e58bd..d5ce6a6 100644 --- a/tests/empty.test.ts +++ b/tests/empty.test.ts @@ -33,6 +33,10 @@ const expectEmptyValues = (schema: S.Schema, from: I, to: A) => { describe("empty", () => { + it("void", () => expectEmptyValues(S.void, undefined, undefined)) + it("any", () => expectEmptyValues(S.any, undefined, undefined)) + it("unknown", () => expectEmptyValues(S.unknown, undefined, undefined)) + it("ast", () => { const fn = () => 0 const ast = pipe(S.NumberFromString, _.empty(fn)).ast.annotations @@ -168,10 +172,6 @@ describe("empty", () => { expectEmptyValues(schema , "ab", "ab") }) - it("void", () => { - testBidirectionality(S.void) - expectEmptyValues(S.void, undefined, undefined) - }) it("symbol", () => { const schema = S.symbol @@ -181,9 +181,6 @@ describe("empty", () => { expect(empty.toString()).toEqual(Symbol().toString()) }) - it("any", () => expectEmptyValues(S.any, undefined, undefined)) - it("unknown", () => expectEmptyValues(S.unknown, undefined, undefined)) - it("lazy", () => { const schema = Category const empty = _.to(schema)()