Skip to content

Commit

Permalink
chore: updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jessekelly881 committed May 31, 2023
1 parent f844074 commit 9b573d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/semigroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const go = (ast: AST.AST): Semigroup<any> => {
}

case "Tuple": {
// TODO: Use rest elements
const els = ast.elements.map((e) => go(e.type))
const rest = ast.rest

Expand Down
11 changes: 4 additions & 7 deletions tests/empty.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ const expectEmptyValues = <A, I>(schema: S.Schema<I, A>, 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
Expand Down Expand Up @@ -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
Expand All @@ -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)()
Expand Down

0 comments on commit 9b573d9

Please sign in to comment.