Advertisement
izznogooood

Untitled

May 16th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. test('should add two numbers', (done) => {
  2.     add(2,3).then((sum) => {
  3.         expect(sum).toBe(5)
  4.         done()
  5.     })
  6. })
  7.  
  8. test('should add two numbers async/await', async () => {
  9.     const sum = await add(11, 22)
  10.     expect(sum).toBe(33)
  11. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement