From 921ba1ee53e5f2219f09050565b8d69fab517d72 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Thu, 9 Sep 2021 12:28:45 +0200 Subject: [PATCH] Chore: fix failing cli test (#15041) --- tests/fixtures/rules/wrong/custom-rule.js | 4 +--- tests/lib/cli.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/fixtures/rules/wrong/custom-rule.js b/tests/fixtures/rules/wrong/custom-rule.js index 9a64230cf7e..9cc26c9ecf2 100644 --- a/tests/fixtures/rules/wrong/custom-rule.js +++ b/tests/fixtures/rules/wrong/custom-rule.js @@ -1,5 +1,3 @@ module.exports = function() { - - "use strict"; - return (null).something; + throw new Error("Boom!"); }; diff --git a/tests/lib/cli.js b/tests/lib/cli.js index b6510bbc009..1b3828b4090 100644 --- a/tests/lib/cli.js +++ b/tests/lib/cli.js @@ -512,7 +512,7 @@ describe("cli", () => { const exit = await cli.execute(code); assert.strictEqual(exit, 2); - }, /Error while loading rule 'custom-rule': Cannot read property/u); + }, /Error while loading rule 'custom-rule': Boom!/u); }); it("should return a warning when rule is matched", async () => {