Skip to content

Instantly share code, notes, and snippets.

@reciosonny
Created May 17, 2020 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reciosonny/4fd41521d800a94ed5ceadb7da5b91f9 to your computer and use it in GitHub Desktop.
Save reciosonny/4fd41521d800a94ed5ceadb7da5b91f9 to your computer and use it in GitHub Desktop.
//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