Skip to content

Instantly share code, notes, and snippets.

@rafinskipg
Created February 11, 2020 20:01
Show Gist options
  • Save rafinskipg/9aacd7302f93f64d1274f5d5e508045a to your computer and use it in GitHub Desktop.
Save rafinskipg/9aacd7302f93f64d1274f5d5e508045a to your computer and use it in GitHub Desktop.
describe('add method', () => {
it('should return a SUM when receiving two different numbers', () => {
for (var i = 0; i < 100; i++) {
const valueA = Math.round(Math.random() * 100)
const valueB = Math.round(Math.random() * 100)
const sum = valueA + valueB
expect(calculator.add(valueA, valueB)).toEqual(sum)
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment