-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
refactor: string schema tests #366
refactor: string schema tests #366
Conversation
59d3941
to
1e2e2c6
Compare
@fabian-hiller ready for review and merge? |
@@ -83,17 +83,17 @@ describe('stringAsync', () => { | |||
describe('schema pipeline', () => { | |||
const schema1 = stringAsync([minLength(2), maxLength(3)]); | |||
|
|||
test('should contain invalid length message, type and requirements', () => { | |||
test('should expose the pipeline', () => { |
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.
I would refactor that and test the entire schema object for the different arguments.
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.
@fabian-hiller so you would like to add more tests for using different arguments, validations ( minLength, maxLength, bic, creditCard .... ) or entire schema properties?
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.
I would not distinguish between different pipeline actions. As you can see in the API reference, string
allows you to pass no argument, only a pipeline or a message and a pipeline. I would just test each combination.
b997a0f
to
6d0cde4
Compare
No description provided.