forked from exercism/DEPRECATED.javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatbash-cipher_test.spec.js
More file actions
39 lines (29 loc) · 1007 Bytes
/
atbash-cipher_test.spec.js
File metadata and controls
39 lines (29 loc) · 1007 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
38
39
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');
});
});