Skip to content

Commit

Permalink
Fixed wrong use of to throw that will fail with unexpected v11
Browse files Browse the repository at this point in the history
I was testing Mocha's compatibility with the upcoming version of Unexpected. For
that version we remove support for satisfy against a function as that has
confused people. I found one test that will fail with the next version as it was
using to throw to satisfy against an error. This test will actually just call
TypeError with the throw error, so it wont really check anything. This PR fixes
the test to assert that the throw error is a TypeError.
  • Loading branch information
sunesimonsen authored and boneskull committed Jan 3, 2019
1 parent 1f325e7 commit 017d865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/node-unit/cli/run-helpers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('cli "run" command', function() {
it('should disallow an array of module names', function() {
expect(
() => validatePlugin({foo: ['bar']}, 'foo'),
'to throw',
'to throw a',
TypeError
);
});
Expand Down

0 comments on commit 017d865

Please sign in to comment.