Created
August 23, 2017 05:47
-
-
Save sricho/8b7b504d49dde02792fa41f61ff16384 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const test = require('tape') | |
const application = (nameApi) => { | |
const name = nameApi.getRandomName() | |
return name.toUpperCase() | |
} | |
test('Application that uppercases names', (assert) => { | |
const apiStub = { | |
getRandomName() { | |
return 'Rooney' | |
} | |
} | |
const expected = 'ROONEY' | |
const actual = application(apiStub) | |
assert.equals(actual, expected) | |
assert.end() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment