-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
32 lines (26 loc) · 765 Bytes
/
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
import test from 'ava';
import jumper from './index.js';
test('normal', (t) => {
const result = jumper('friday deploy, good luck!');
t.true(result.length > 0);
t.true(result.includes('friday'));
t.true(result.includes('deploy'));
t.true(result.includes('good luck!'));
t.true(result.split('\n').length === 9);
});
test('compact', (t) => {
const result = jumper('friday deploy, good luck!', {
compact: true
});
t.true(result.length > 0);
t.true(result.includes('friday'));
t.true(result.includes('deploy'));
t.true(result.includes('good luck!'));
t.true(result.split('\n').length === 7);
});
test('extra floors', (t) => {
const result = jumper('friday deploy, good luck!', {
extraFloors: 1
});
t.true(result.split('\n').length === 11);
});