Skip to content

Instantly share code, notes, and snippets.

@raphaelpor
Created December 8, 2016 15:48
Show Gist options
  • Save raphaelpor/8af09464dc306684349201230952e032 to your computer and use it in GitHub Desktop.
Save raphaelpor/8af09464dc306684349201230952e032 to your computer and use it in GitHub Desktop.
const test = require('ava')
const greet = require('./greet')
test('method: greet', t => {
t.is(typeof greet, 'function', 'greet is a function')
t.is(greet(), 'Hello, people!', 'greet returns a default name')
t.is(greet('Raphael Porto'), 'Hello, Raphael Porto!', 'greet returns the name')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment