Skip to content

Commit

Permalink
Test spec fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaub committed May 21, 2020
1 parent 1edfb70 commit 08c3124
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
27 changes: 16 additions & 11 deletions test/node-unit/cli/options.spec.js
Expand Up @@ -206,13 +206,14 @@ describe('options', function() {
});

it('should have attempted to load two files', function() {
expect(readFileSync, 'was called times', 2).and(
'to have calls satisfying',
[
{args: ['/some/package.json', 'utf8']},
{args: ['/path/to/mocha.opts', 'utf8']}
]
);
expect(
readFileSync,
'was called times',
2
).and('to have calls satisfying', [
{args: ['/some/package.json', 'utf8']},
{args: ['/path/to/mocha.opts', 'utf8']}
]);
});

it('should set opts = false', function() {
Expand Down Expand Up @@ -255,10 +256,14 @@ describe('options', function() {
});

it('should not attempt to read any mocha.opts', function() {
expect(readFileSync, 'was called times', 1).and(
'to have all calls satisfying',
['/some/package.json', 'utf8']
);
expect(
readFileSync,
'was called times',
1
).and('to have all calls satisfying', [
'/some/package.json',
'utf8'
]);
});

it('should set opts = false', function() {
Expand Down
6 changes: 5 additions & 1 deletion test/unit/utils.spec.js
Expand Up @@ -409,7 +409,11 @@ describe('lib/utils', function() {
});

it('should handle empty functions (with no properties)', function() {
expect(stringify(function() {}), 'to be', '[Function]');
expect(
stringify(function() {}),
'to be',
'[Function]'
);
expect(
stringify({foo: function() {}}),
'to be',
Expand Down

0 comments on commit 08c3124

Please sign in to comment.