-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
44 lines (34 loc) · 1.21 KB
/
test.js
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
const assert = require('assert');
const niceString = require('./nice-string');
const niceString2 = require('./nice-string2');
describe('Day 5: Doesn\'t He Have Intern - Elves For This?', () => {
it('ugknbfddgicrmopn should be nice', () => {
assert.equal(niceString('ugknbfddgicrmopn'), true);
});
it('aaa should be nice', () => {
assert.equal(niceString('aaa'), true);
});
it('jchzalrnumimnmhp should be naughty', () => {
assert.equal(niceString('jchzalrnumimnmhp'), false);
});
it('haegwjzuvuyypxyu should be naughty', () => {
assert.equal(niceString('haegwjzuvuyypxyu'), false);
});
it('dvszwmarrgswjxmb should be naughty', () => {
assert.equal(niceString('dvszwmarrgswjxmb'), false);
});
describe('Part Two', () => {
it('qjhvhtzxzqqjkmpb should be nice', () => {
assert.equal(niceString2('qjhvhtzxzqqjkmpb'), true);
});
it('xxyxx should be nice', () => {
assert.equal(niceString2('xxyxx'), true);
});
it('uurcxstgmygtbstg should be naughty', () => {
assert.equal(niceString2('uurcxstgmygtbstg'), false);
});
it('ieodomkazucvgmuy should be naughty', () => {
assert.equal(niceString2('ieodomkazucvgmuy'), false);
});
});
});