fix: Fix the wrapper data types

This commit is contained in:
BluJ
2023-05-01 16:01:21 -06:00
parent ef7bfc3c53
commit 28d3599e11
3 changed files with 29 additions and 13 deletions

View File

@@ -619,7 +619,7 @@ describe("Builder List", () => {
)
const validator = value.validator
validator.unsafeCast(["test", "text"])
expect(() => validator.unsafeCast([3,4])).toThrowError()
expect(() => validator.unsafeCast([3, 4])).toThrowError()
expect(() => validator.unsafeCast(null)).toThrowError()
testOutput<typeof validator._TYPE, string[]>()(null)
expect(await value.build({} as any)).toMatchObject({
@@ -636,9 +636,8 @@ describe("Builder List", () => {
})),
)
const validator = value.validator
expect(() =>
validator.unsafeCast(["test", "text"])).toThrowError()
validator.unsafeCast([4,2])
expect(() => validator.unsafeCast(["test", "text"])).toThrowError()
validator.unsafeCast([4, 2])
expect(() => validator.unsafeCast(null)).toThrowError()
validator.unsafeCast([])
testOutput<typeof validator._TYPE, number[]>()(null)
@@ -648,7 +647,6 @@ describe("Builder List", () => {
})
})
})
})
describe("Nested nullable values", () => {
test("Testing text", async () => {