Skip to content

Commit

Permalink
Added future test for Valibot's brand
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscoheat committed Apr 8, 2024
1 parent 0e5b595 commit c172604
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/tests/superValidate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof schema>;
type IdSchema = { id: string & v.Brand<"Id"> };
// ^? { id: string & Brand<"Id"> }
const a: FormPathLeaves<T> = 'id';
// @ts-expect-error Should handle brand
const b: FormPathLeaves<T> = 'id.length';
a;
b;
});
*/

/* it('should have the correct Input and Output types', () => {
const logSchema = v.object({
id: v.nullish(v.string(), ''),
Expand Down

0 comments on commit c172604

Please sign in to comment.