Skip to content

Commit f736217

Browse files
authored
merge: Add test case to KeywordShiftedAlphabet algorithm (#1013)
1 parent 21a8511 commit f736217

File tree

1 file changed

+13
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)