Created
November 20, 2017 17:55
-
-
Save nitish24p/daf0e9319d7044a35696c4e4081c26fa to your computer and use it in GitHub Desktop.
initialise Ava
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import test from 'ava'; | |
function sum (a, b) { | |
return a + b; | |
} | |
test('foo is being tested', t => { | |
t.pass(); | |
}) | |
test('bar is being tested', async t => { | |
const bar = Promise.resolve('bar'); | |
t.is(await bar, 'bar'); | |
}); | |
test('sum of 2 numbers', t => { | |
t.plan(2); | |
t.pass('this assertion passed'); | |
t.is(sum(1, 2), 3); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment