Created
May 17, 2020 14:38
-
-
Save reciosonny/4fd41521d800a94ed5ceadb7da5b91f9 to your computer and use it in GitHub Desktop.
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
//uppercase.js | |
function uppercase(str, callback) { | |
callback(str.toUpperCase()) | |
} | |
module.exports = uppercase | |
//uppercase.test.js | |
const uppercase = require('./src/uppercase') | |
test(`uppercase 'test' to equal 'TEST'`, (done) => { | |
uppercase('test', (str) => { | |
expect(str).toBe('TEST') | |
done() | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment