diff --git a/Ciphers/test/Atbash.test.js b/Ciphers/test/Atbash.test.js index 4db2faa772..f4dd3594e8 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) }) })