-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapp.test.js
30 lines (29 loc) · 836 Bytes
/
app.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
import {program} from './app';
import {ssg_} from './index';
describe('app', () => {
test('version', async () => {
program.version = '0.1.0';
await expect(program.version).toBe('0.1.0');
});
test('input', async () => {
program.input = ssg_(`${program.opts().input}`);
await expect(program.input).toBe(ssg_(`${program.opts().input}`));
});
test('help', async () => {
program.help = 'help';
await expect(program.help).toBe('help');
});
test('lang', async () => {
program.lang = ssg_(
`${program.opts().input}`,
`${program.opts().lang}`
);
await expect(program.lang).toBe(
ssg_(`${program.opts().input}`, `${program.opts().lang}`)
);
});
test('output', async () => {
program.output = ssg_(`${program.opts().output}`);
await expect(program.output).toBe(ssg_(`${program.opts().output}`));
});
});