From 1249dbe2029c34d9af03bc13e70801d0f8bfb1eb Mon Sep 17 00:00:00 2001 From: TrasherDK Date: Mon, 28 Mar 2022 12:20:16 +0700 Subject: [PATCH] merge: Round-trip testing for Atbash cipher (#958) - fix the test description --- Ciphers/test/Atbash.test.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Ciphers/test/Atbash.test.js b/Ciphers/test/Atbash.test.js index 4db2faa77..f4dd3594e 100644 --- a/Ciphers/test/Atbash.test.js +++ b/Ciphers/test/Atbash.test.js @@ -1,7 +1,7 @@ import Atbash from '../Atbash' describe('Testing Atbash function', () => { - it('Test - 1, passing the non-string as an argument', () => { + it('Test - 1, passing a non-string as an argument', () => { expect(() => Atbash(0x345)).toThrow() expect(() => Atbash(123)).toThrow() expect(() => Atbash(123n)).toThrow() @@ -10,8 +10,9 @@ describe('Testing Atbash function', () => { expect(() => Atbash([])).toThrow() }) - it('Test - 2, passing all alphabets', () => { - expect(Atbash('HELLO WORLD')).toBe('SVOOL DLIOW') - expect(Atbash('The quick brown fox jumps over the lazy dog')).toBe('Gsv jfrxp yildm ulc qfnkh levi gsv ozab wlt') + it('Test - 2, passing a string as an argument', () => { + const clearText = 'The quick brown fox jumps over the lazy dog' + const cryptText = Atbash(clearText) + expect(Atbash(cryptText)).toBe(clearText) }) })