Created
March 19, 2019 02:24
-
-
Save Qquanwei/c175f94f6b8768b4e7092b9c9b055957 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const shouldSizeMatch = compact( | |
itShouldProp('width', large(20), always('width should large 20')), | |
itShouldProp('height', large(20), always('height should large 20')) | |
); | |
of({ width: 10, height: 30}) | |
.map(shouldSizeMatch) | |
.validate((success, reason) => { | |
// reuse rules | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment