From 25f18760cc132e7ad7df28e10880cbc62ec59885 Mon Sep 17 00:00:00 2001 From: dm-murphy <60681378+dm-murphy@users.noreply.github.com> Date: Thu, 2 Jul 2020 14:50:37 -0400 Subject: [PATCH] Update caesar.spec.js Proposing a change for caesar.spec.js for test 3 ('works with phrases') and test 4 ('works with negative shift'). The test for 'wraps' is supposed to come after these ones, but currently using the word "World!" in the earlier tests with a 5 key shift will require that wraps are already working, thus the spec test will fail even if the code is appropriate for phrases and negative shifts. If the learning process is to move one by one progressively through the spec tests, then I think it would be better not to require wraps to be working until the actual 'wraps' requirement in test 5. I believe simply replacing the word "World!" with "There!" should solve the issue. --- caesar/caesar.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/caesar/caesar.spec.js b/caesar/caesar.spec.js index 49fe254..3dc06ee 100644 --- a/caesar/caesar.spec.js +++ b/caesar/caesar.spec.js @@ -8,10 +8,10 @@ describe('caesar', function() { expect(caesar('Aaa', 1)).toEqual('Bbb'); }); xit('works with phrases', function() { - expect(caesar('Hello, World!', 5)).toEqual('Mjqqt, Btwqi!'); + expect(caesar('Hello, There!', 5)).toEqual('Mjqqt, Ymjwj!'); }); xit('works with negative shift', function() { - expect(caesar('Mjqqt, Btwqi!', -5)).toEqual('Hello, World!'); + expect(caesar('Mjqqt, Ymjwj!', -5)).toEqual('Hello, There!'); }); xit('wraps', function() { expect(caesar('Z', 1)).toEqual('A');