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