Skip to content

Instantly share code, notes, and snippets.

@digitalsadhu
Last active October 11, 2017 20:22
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 digitalsadhu/f98b1ebcedc46c5e9d20bd82898e9762 to your computer and use it in GitHub Desktop.
Save digitalsadhu/f98b1ebcedc46c5e9d20bd82898e9762 to your computer and use it in GitHub Desktop.
function sum(a, b) {
return a + b;
}
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
});
it('should add 1 + 2 and return 3', () => {
expect(sum(1, 2)).toBe(3);
});
describe('adding 1 + 2', () => {
it('should equal 3', () => {
expect(sum(1, 2)).toBe(3);
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment