diff --git a/Ciphers/test/KeywordShiftedAlphabet.test.js b/Ciphers/test/KeywordShiftedAlphabet.test.js new file mode 100644 index 0000000000..7cc7c4820b --- /dev/null +++ b/Ciphers/test/KeywordShiftedAlphabet.test.js @@ -0,0 +1,13 @@ +import { encrypt, decrypt } from '../KeywordShiftedAlphabet' + +test('Hello world! === dcrypt(encrypt(Hello world!))', () => { + const word = 'Hello world!' + const result = decrypt('keyword', encrypt('keyword', word)) + expect(result).toMatch(word) +}) + +test('The Algorithms === dcrypt(encrypt(The Algorithms))', () => { + const word = 'The Algorithms' + const result = decrypt('keyword', encrypt('keyword', word)) + expect(result).toMatch(word) +})