File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,9 @@ describe("jest-axe", () => {
218218 const matcherFunction = toHaveNoViolations . toHaveNoViolations ;
219219 expect ( ( ) => {
220220 matcherFunction ( { } ) ;
221- } ) . toThrow ( "No violations found in aXe results object" ) ;
221+ } ) . toThrow (
222+ "Unexpected aXe results object. No violations property found.\nDid you change the `reporter` in your aXe configuration?"
223+ ) ;
222224 } ) ;
223225
224226 it ( "returns pass as true when no violations are present" , ( ) => {
Original file line number Diff line number Diff line change @@ -123,7 +123,9 @@ function filterViolations(violations, impactLevels) {
123123const toHaveNoViolations = {
124124 toHaveNoViolations ( results ) {
125125 if ( typeof results . violations === "undefined" ) {
126- throw new Error ( "No violations found in aXe results object" ) ;
126+ throw new Error (
127+ "Unexpected aXe results object. No violations property found.\nDid you change the `reporter` in your aXe configuration?"
128+ ) ;
127129 }
128130
129131 const violations = filterViolations (
You can’t perform that action at this time.
0 commit comments