This commit is contained in:
parent
38054d3812
commit
b2722b487e
1 changed files with 19 additions and 1 deletions
|
@ -88,7 +88,25 @@ describe('subreddit', () => {
|
|||
|
||||
expect(subreddit).toBe('Horses');
|
||||
}, 5000);
|
||||
})
|
||||
});
|
||||
|
||||
describe('json', () => {
|
||||
test('GIVEN -j is supplied, EXPECT output to be valid JSON', async () => {
|
||||
const result = await cli(['-j'], '.');
|
||||
|
||||
const json = JSON.parse(result.stdout);
|
||||
|
||||
expect(json).toBeDefined();
|
||||
}, 5000);
|
||||
|
||||
test('GIVEN --json is supplied, EXPECT output to be valid JSON', async () => {
|
||||
const result = await cli(['--json'], '.');
|
||||
|
||||
const json = JSON.parse(result.stdout);
|
||||
|
||||
expect(json).toBeDefined();
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
function cli(args: string[], cwd: string): Promise<cliResult> {
|
||||
return new Promise(resolve => {
|
||||
|
|
Loading…
Reference in a new issue