Skip to content

Commit

Permalink
add test for #719
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Dec 10, 2024
1 parent e22897a commit dc8c0c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/2.1.x/union.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@ describe.concurrent('union', () => {
}
)
})

it('readonly', () => {
assert.strictEqual(t.getTags(t.readonly(t.strict({ a: t.string }))), t.emptyTags)
assert.deepStrictEqual(t.getTags(t.readonly(t.strict({ tag: t.literal('a') }))), { tag: ['a'] })
assert.deepStrictEqual(t.getTags(t.readonly(t.strict({ tag: t.literal('a'), type: t.literal('b') }))), {
tag: ['a'],
type: ['b']
})
})
})

it('getIndex', () => {
Expand Down

0 comments on commit dc8c0c2

Please sign in to comment.