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 committed Jan 3, 2019
1 parent 1f325e7 commit f57a904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/node-unit/cli/run-helpers.spec.js
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 f57a904

Please sign in to comment.