Skip to content

Commit

Permalink
tests: update
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Sep 26, 2020
1 parent 021556e commit b4a2406
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/json/json.test.js
@@ -1,6 +1,6 @@
'use strict';
const { run } = require('../utils/test-utils');
const { stat } = require('fs');
const { stat, readFile } = require('fs');
const { resolve } = require('path');

describe('json flag', () => {
Expand All @@ -24,6 +24,11 @@ describe('json flag', () => {
expect(stats.isFile()).toBe(true);
done();
});
readFile(resolve(__dirname, 'stats.json'), 'utf-8', (err, data) => {
expect(err).toBe(null);
expect(() => JSON.parse(data)).not.toThrow();
done();
});
});

it('should return valid json with -j alias', () => {
Expand Down

0 comments on commit b4a2406

Please sign in to comment.