Skip to content

Instantly share code, notes, and snippets.

@joefearnley
Created June 30, 2020 14:11
Show Gist options
  • Save joefearnley/52b2f0190f85cff02d3aa2d909ef3185 to your computer and use it in GitHub Desktop.
Save joefearnley/52b2f0190f85cff02d3aa2d909ef3185 to your computer and use it in GitHub Desktop.
The 10-Day JS Challenge - Day 6: Enclose in Brackets
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