Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe('isEmpty method with the argument', () => {
- const validate = require('./validate');
- describe.each`
- str | expected
- ${null} | ${true}
- ${""} | ${true}
- ${"word"} | ${false}
- `('$str', ({str, expected}) => {
- test(`returns ${expected}`, () => {
- expect(validate.isEmpty(str)).toBe(expected)
- });
- });
- });
Add Comment
Please, Sign In to add comment