Created
June 30, 2020 14:11
-
-
Save joefearnley/52b2f0190f85cff02d3aa2d909ef3185 to your computer and use it in GitHub Desktop.
The 10-Day JS Challenge - Day 6: Enclose in Brackets
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
const encloseInBrackets = str => `(${str})`; | |
describe('encloseInBrackets()', () => { | |
it('adds () around a string', () => { | |
// arrange | |
const str = "Yo"; | |
// act | |
const result = encloseInBrackets(str); | |
// log | |
console.log("result: ", result); | |
// assert | |
expect(result).toBe('(Yo)'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment