mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-08 12:35:16 +08:00
14 lines
440 B
JavaScript
14 lines
440 B
JavaScript
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)
|
|
})
|