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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy