From f57a904104ebd14917655ecadcf6152b5cad3158 Mon Sep 17 00:00:00 2001 From: Sune Simonsen Date: Thu, 3 Jan 2019 17:48:19 +0100 Subject: [PATCH] Fixed wrong use of to throw that will fail with unexpected v11 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. --- test/node-unit/cli/run-helpers.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/node-unit/cli/run-helpers.spec.js b/test/node-unit/cli/run-helpers.spec.js index b3a0fb5520..a2a63335f5 100644 --- a/test/node-unit/cli/run-helpers.spec.js +++ b/test/node-unit/cli/run-helpers.spec.js @@ -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 ); });