-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Introduce schema.any
#21775
Introduce schema.any
#21775
Conversation
💚 Build Succeeded |
expect(schema.any().validate(true)).toBe(true); | ||
expect(schema.any().validate(100)).toBe(100); | ||
expect(schema.any().validate('foo')).toBe('foo'); | ||
expect(schema.any().validate({ foo: 'bar', baz: 2 })).toEqual({ foo: 'bar', baz: 2 }); |
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 tests boolean, number, string, object. what about null and undefined? nevermind, we have undefined below. maybe just null
?
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.
Yep, added a couple of expect
's for null
, thanks!
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.
Looks great! Congrats on the 1st PR. (I just made a comment about null, please ignore if it doesn't apply.)
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.
LGTM
💚 Build Succeeded |
6.x/6.5: 15e17aa |
The first of the PRs extracted from #19994. It introduces
schema.any
(will be needed to pass legacy logging config of unknown shape to the legacy log appender that resides in the core).Unblocks #19994