Skip to content

Commit 08c3124

Browse files
committed
Test spec fixes
1 parent 1edfb70 commit 08c3124

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

test/node-unit/cli/options.spec.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,14 @@ describe('options', function() {
206206
});
207207

208208
it('should have attempted to load two files', function() {
209-
expect(readFileSync, 'was called times', 2).and(
210-
'to have calls satisfying',
211-
[
212-
{args: ['/some/package.json', 'utf8']},
213-
{args: ['/path/to/mocha.opts', 'utf8']}
214-
]
215-
);
209+
expect(
210+
readFileSync,
211+
'was called times',
212+
2
213+
).and('to have calls satisfying', [
214+
{args: ['/some/package.json', 'utf8']},
215+
{args: ['/path/to/mocha.opts', 'utf8']}
216+
]);
216217
});
217218

218219
it('should set opts = false', function() {
@@ -255,10 +256,14 @@ describe('options', function() {
255256
});
256257

257258
it('should not attempt to read any mocha.opts', function() {
258-
expect(readFileSync, 'was called times', 1).and(
259-
'to have all calls satisfying',
260-
['/some/package.json', 'utf8']
261-
);
259+
expect(
260+
readFileSync,
261+
'was called times',
262+
1
263+
).and('to have all calls satisfying', [
264+
'/some/package.json',
265+
'utf8'
266+
]);
262267
});
263268

264269
it('should set opts = false', function() {

test/unit/utils.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,11 @@ describe('lib/utils', function() {
409409
});
410410

411411
it('should handle empty functions (with no properties)', function() {
412-
expect(stringify(function() {}), 'to be', '[Function]');
412+
expect(
413+
stringify(function() {}),
414+
'to be',
415+
'[Function]'
416+
);
413417
expect(
414418
stringify({foo: function() {}}),
415419
'to be',

0 commit comments

Comments
 (0)