From 61cd0cb83fc4931fd892bd77cd0a27d2c4a1721e Mon Sep 17 00:00:00 2001 From: billalp Date: Sat, 26 Oct 2019 07:23:55 +0100 Subject: [PATCH] Partially working --- caesar/caesar.spec.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/caesar/caesar.spec.js b/caesar/caesar.spec.js index 49fe254..89d243f 100644 --- a/caesar/caesar.spec.js +++ b/caesar/caesar.spec.js @@ -1,24 +1,30 @@ const caesar = require('./caesar') describe('caesar', function() { - it('works with single letters', function() { - expect(caesar('A', 1)).toEqual('B'); + xit('works with single letters', function() { + expect(caesar('Y', 1)).toEqual('Z'); }); - xit('works with words', function() { + + it('works with words', function() { expect(caesar('Aaa', 1)).toEqual('Bbb'); }); + xit('works with phrases', function() { expect(caesar('Hello, World!', 5)).toEqual('Mjqqt, Btwqi!'); }); + xit('works with negative shift', function() { expect(caesar('Mjqqt, Btwqi!', -5)).toEqual('Hello, World!'); }); + xit('wraps', function() { expect(caesar('Z', 1)).toEqual('A'); }); + xit('works with large shift factors', function() { expect(caesar('Hello, World!', 75)).toEqual('Ebiil, Tloia!'); }); + xit('works with large negative shift factors', function() { expect(caesar('Hello, World!', -29)).toEqual('Ebiil, Tloia!'); });