-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathpangram.spec.js
More file actions
50 lines (39 loc) · 1.66 KB
/
pangram.spec.js
File metadata and controls
50 lines (39 loc) · 1.66 KB
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
40
41
42
43
44
45
46
47
48
49
50
var Pangram = require('./pangram');
describe('Pangram()', function() {
it('empty sentence', function() {
var pangram = new Pangram('');
expect(pangram.isPangram()).toBe(false);
});
xit('pangram with only lower case', function() {
var pangram = new Pangram("the quick brown fox jumps over the lazy dog");
expect(pangram.isPangram()).toBe(true);
});
xit("missing character 'x'", function() {
var pangram = new Pangram("a quick movement of the enemy will jeopardize five gunboats");
expect(pangram.isPangram()).toBe(false);
});
xit("another missing character 'x'", function() {
var pangram = new Pangram("the quick brown fish jumps over the lazy dog");
expect(pangram.isPangram()).toBe(false);
});
xit("pangram with underscores", function() {
var pangram = new Pangram("the_quick_brown_fox_jumps_over_the_lazy_dog");
expect(pangram.isPangram()).toBe(true);
});
xit("pangram with numbers", function() {
var pangram = new Pangram("the 1 quick brown fox jumps over the 2 lazy dogs");
expect(pangram.isPangram()).toBe(true);
});
xit('missing letters replaced by numbers', function() {
var pangram = new Pangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog");
expect(pangram.isPangram()).toBe(false);
});
xit('pangram with mixed case and punctuation', function() {
var pangram = new Pangram("\"Five quacking Zephyrs jolt my wax bed.\"");
expect(pangram.isPangram()).toBe(true);
});
xit('pangram with non-ascii characters', function() {
var pangram = new Pangram("Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich.");
expect(pangram.isPangram()).toBe(true);
});
});