From c1726045803bc58d7e8782b9435888bb454ba379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=B6derlund?= Date: Mon, 8 Apr 2024 08:59:39 +0200 Subject: [PATCH] Added future test for Valibot's brand --- src/tests/superValidate.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/tests/superValidate.test.ts b/src/tests/superValidate.test.ts index 184ca9aa..9034ab17 100644 --- a/src/tests/superValidate.test.ts +++ b/src/tests/superValidate.test.ts @@ -262,6 +262,21 @@ describe('Valibot', () => { expect(() => valibot(schema)).not.toThrow(); }); + /* + it('should work with FormPathLeaves and brand', async () => { + const schema = v.object({ id: v.brand(v.string(), 'Id') }); + type T = Infer; + type IdSchema = { id: string & v.Brand<"Id"> }; + // ^? { id: string & Brand<"Id"> } + + const a: FormPathLeaves = 'id'; + // @ts-expect-error Should handle brand + const b: FormPathLeaves = 'id.length'; + a; + b; + }); + */ + /* it('should have the correct Input and Output types', () => { const logSchema = v.object({ id: v.nullish(v.string(), ''),