Skip to content

Commit

Permalink
Clean test output and check for DEPRECATED message
Browse files Browse the repository at this point in the history
MonsieurV committed Oct 26, 2021
1 parent 3a1600d commit cfa852e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions __tests__/PaginationBoxView-test.js
Original file line number Diff line number Diff line change
@@ -547,6 +547,7 @@ describe('Test pagination behaviour', () => {
});

it('test ariaLabelBuilder works with extraAriaContext', function () {
const consoleWarnMock = jest.spyOn(console, 'warn').mockImplementation();
const linkedPagination = ReactTestUtils.renderIntoDocument(
<PaginationBoxView
initialPage={1}
@@ -574,6 +575,8 @@ describe('Test pagination behaviour', () => {
.querySelector('.selected a')
.getAttribute('aria-label')
).toBe('Current page');
expect(console.warn).toHaveBeenCalledTimes(1);
expect(console.warn).toHaveBeenLastCalledWith("DEPRECATED (react-paginate): The extraAriaContext prop is deprecated. You should now use the ariaLabelBuilder instead.");
});
});

0 comments on commit cfa852e

Please sign in to comment.