forked from exercism/DEPRECATED.javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatbash-cipher.spec.js
More file actions
37 lines (29 loc) · 1014 Bytes
/
atbash-cipher.spec.js
File metadata and controls
37 lines (29 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var atbash = require('./atbash-cipher');
describe('encode', function () {
it('encodes no', function () {
expect(atbash.encode('no')).toEqual('ml');
});
xit('encodes yes', function () {
expect(atbash.encode('yes')).toEqual('bvh');
});
xit('encodes OMG', function () {
expect(atbash.encode('OMG')).toEqual('lnt');
});
xit('encodes O M G', function () {
expect(atbash.encode('O M G')).toEqual('lnt');
});
xit('encodes long words', function () {
expect(atbash.encode('mindblowingly')).toEqual('nrmwy oldrm tob');
});
xit('encodes numbers', function () {
expect(atbash.encode('Testing, 1 2 3, testing.'))
.toEqual('gvhgr mt123 gvhgr mt');
});
xit('encodes sentences', function () {
expect(atbash.encode('Truth is fiction.')).toEqual('gifgs rhurx grlm');
});
xit('encodes all the things', function () {
expect(atbash.encode('The quick brown fox jumps over the lazy dog.'))
.toEqual('gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt');
});
});