Skip to content

Instantly share code, notes, and snippets.

@nitish24p nitish24p/initAva.js
Created Nov 20, 2017

Embed
What would you like to do?
initialise Ava
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
You can’t perform that action at this time.