-
-
Notifications
You must be signed in to change notification settings - Fork 9
enums and removing features n sharmk #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v4
Are you sure you want to change the base?
Conversation
eating honey mustard with no burger
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const schema = k.nativeEnum(Status); | ||
|
|
||
| it('should accept valid numeric enum values', () => { | ||
| assert.strictEqual(schema.parse(0), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add enum tests for like
assert.strictEqual(schema.parse(Status.Pending), 0);
even though in theory it's still 0, it's nice to assure that contract
| }); | ||
| }); | ||
|
|
||
| describe('const enum compatibility', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a const enum, this is an as const object. we should rename this test
a const enum is already a typescript thing
No description provided.