Skip to content

Commit

Permalink
Use reporter.error in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed May 14, 2024
1 parent 2aba203 commit 98e5847
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/custom.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
},
]);
Expand Down

0 comments on commit 98e5847

Please sign in to comment.