Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test('should add two numbers', (done) => {
- add(2,3).then((sum) => {
- expect(sum).toBe(5)
- done()
- })
- })
- test('should add two numbers async/await', async () => {
- const sum = await add(11, 22)
- expect(sum).toBe(33)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement