mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 12:21:57 +00:00
chore: Fix the test descriptions and values
This commit is contained in:
@@ -64,10 +64,10 @@ describe("values", () => {
|
|||||||
expect(() => validator.unsafeCast(null)).toThrowError()
|
expect(() => validator.unsafeCast(null)).toThrowError()
|
||||||
testOutput<typeof validator._TYPE, string>()(null)
|
testOutput<typeof validator._TYPE, string>()(null)
|
||||||
})
|
})
|
||||||
test("text", async () => {
|
test("text with default", async () => {
|
||||||
const value = Value.text({
|
const value = Value.text({
|
||||||
name: "Testing",
|
name: "Testing",
|
||||||
required: { default: "null" },
|
required: { default: "this is a default value" },
|
||||||
})
|
})
|
||||||
const validator = value.validator
|
const validator = value.validator
|
||||||
const rawIs = await value.build({} as any)
|
const rawIs = await value.build({} as any)
|
||||||
@@ -336,10 +336,10 @@ describe("values", () => {
|
|||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
test("text", async () => {
|
test("text with default", async () => {
|
||||||
const value = Value.dynamicText(async () => ({
|
const value = Value.dynamicText(async () => ({
|
||||||
name: "Testing",
|
name: "Testing",
|
||||||
required: { default: "null" },
|
required: { default: "this is a default value" },
|
||||||
}))
|
}))
|
||||||
const validator = value.validator
|
const validator = value.validator
|
||||||
validator.unsafeCast("test text")
|
validator.unsafeCast("test text")
|
||||||
@@ -348,7 +348,7 @@ describe("values", () => {
|
|||||||
expect(await value.build(fakeOptions)).toMatchObject({
|
expect(await value.build(fakeOptions)).toMatchObject({
|
||||||
name: "Testing",
|
name: "Testing",
|
||||||
required: true,
|
required: true,
|
||||||
default: "null",
|
default: "this is a default value",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
test("optional text", async () => {
|
test("optional text", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user