Skip to content

Instantly share code, notes, and snippets.

@lupomontero
Created July 1, 2018 12:36
Show Gist options
  • Save lupomontero/d834f755f1211637110a8beaa2bd83f4 to your computer and use it in GitHub Desktop.
Save lupomontero/d834f755f1211637110a8beaa2bd83f4 to your computer and use it in GitHub Desktop.
const sum = require('./sum');
describe('sum()', () => {
it('should return 5 when arg a is 2 and arg b is 3', () => {
expect(sum(2, 3)).toBe(5);
});
it('should return 1 when arg a is 1 and arg b is 0', () => {
expect(sum(1, 0)).toBe(1);
});
it('should return 3 when arg a is 2 and arg b is 1', () => {
expect(sum(2, 1)).toBe(3);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment