From 98e58475a79713edae2fcf84c9450e89156b7afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Tue, 14 May 2024 22:23:24 +0200 Subject: [PATCH] Use reporter.error in test --- test/custom.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/custom.spec.js b/test/custom.spec.js index 12187fc..7a74d71 100644 --- a/test/custom.spec.js +++ b/test/custom.spec.js @@ -49,13 +49,13 @@ describe('Rule: custom', function () { it('should provide file information', function () { return testSucceeds([ - (_reporter, _$, _ast, info) => { + (reporter, _$, _ast, info) => { if (!info) { - throw new Error('no info provided'); + reporter.error('no info provided'); } if (!Object.hasOwn(info, 'filepath')) { - throw new Error('no filepath provided on info'); + reporter.error('no filepath provided on info'); } }, ]);