From 16f7aba7ef1b48d940bca66adb59d10527b885e8 Mon Sep 17 00:00:00 2001 From: Andinus Date: Wed, 25 Aug 2021 22:59:37 +0530 Subject: JS: Use template literals in two-fer --- javascript/two-fer/two-fer.js | 2 +- javascript/two-fer/two-fer.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'javascript') diff --git a/javascript/two-fer/two-fer.js b/javascript/two-fer/two-fer.js index 2349ad7..cb896a3 100644 --- a/javascript/two-fer/two-fer.js +++ b/javascript/two-fer/two-fer.js @@ -1,3 +1,3 @@ export const twoFer = (name = "you") => { - return "One for " + name + ", one for me."; + return `One for ${name}, one for me.` }; diff --git a/javascript/two-fer/two-fer.spec.js b/javascript/two-fer/two-fer.spec.js index 1c39a36..9a0cf53 100644 --- a/javascript/two-fer/two-fer.spec.js +++ b/javascript/two-fer/two-fer.spec.js @@ -5,11 +5,11 @@ describe('twoFer()', () => { expect(twoFer()).toEqual('One for you, one for me.'); }); - xtest('a name given', () => { + test('a name given', () => { expect(twoFer('Alice')).toEqual('One for Alice, one for me.'); }); - xtest('another name given', () => { + test('another name given', () => { expect(twoFer('Bob')).toEqual('One for Bob, one for me.'); }); }); -- cgit 1.4.1-2-gfad0