Content-Length: 266054 | pFad | http://github.com/webmansa/JavaScript-algorithms/commit/4cd6fd4f1bbbb1ad52b373a2ef14d4751620ce6f

01 merge: Add test case to Vigenere Cipher Algorithm (#1017) · webmansa/JavaScript-algorithms@4cd6fd4 · GitHub
Skip to content

Commit 4cd6fd4

Browse files
authored
merge: Add test case to Vigenere Cipher Algorithm (TheAlgorithms#1017)
1 parent c865654 commit 4cd6fd4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Ciphers/test/VigenereCipher.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { encrypt, decrypt } from '../VigenereCipher'
2+
3+
test('Hello world! === dcrypt(encrypt(Hello world!))', () => {
4+
const word = 'Hello world!'
5+
const result = decrypt(encrypt(word, 'code'), 'code')
6+
expect(result).toMatch(word)
7+
})
8+
9+
test('The Algorithms === dcrypt(encrypt(The Algorithms))', () => {
10+
const word = 'The Algorithms'
11+
const result = decrypt(encrypt(word, 'code'), 'code')
12+
expect(result).toMatch(word)
13+
})

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/webmansa/JavaScript-algorithms/commit/4cd6fd4f1bbbb1ad52b373a2ef14d4751620ce6f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy