Skip to content

Commit f3dbe25

Browse files
committed
ci(Add test for parsing JSON):
1 parent bebb9de commit f3dbe25

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/test.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,3 +394,22 @@ describe('Control', function () {
394394
});
395395

396396
});
397+
398+
describe('JSON', function () {
399+
let promise;
400+
401+
before(function () {
402+
let control = new Control('Control');
403+
control.getArguments = () => ['--color', 0, '--help', '--output', 'json'];
404+
promise = control.open()
405+
.then(result => JSON.parse(result.raw.stdout))
406+
.catch(result => done(result.error));
407+
});
408+
409+
it('should parse global options', function () {
410+
return promise.then(json => {
411+
assert.ok('JSON successfully parsed');
412+
});
413+
});
414+
});
415+

0 commit comments

Comments
 (0)