Skip to content

Instantly share code, notes, and snippets.

@BumpeiShimada
Last active October 16, 2018 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BumpeiShimada/61b25d92297932f125fe2b4609a26b30 to your computer and use it in GitHub Desktop.
Save BumpeiShimada/61b25d92297932f125fe2b4609a26b30 to your computer and use it in GitHub Desktop.
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)
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment