Skip to content

Instantly share code, notes, and snippets.

@Rolilink
Created September 30, 2017 23:57
Show Gist options
  • Select an option

  • Save Rolilink/61b2bbbb4e71d2c452824665504d3c31 to your computer and use it in GitHub Desktop.

Select an option

Save Rolilink/61b2bbbb4e71d2c452824665504d3c31 to your computer and use it in GitHub Desktop.
const sum = (n1, n2) => (n1 + n2);
describe('#sum', () => {
it('should add both numbers', () => {
expect(sum(1,2)).toMatchSnapshot();
});
});
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`#sum should add both numbers 1`] = `3`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment