Skip to content

Commit

Permalink
test(ControlButtons): wrap component in withTheme for rendering in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olafsulich committed Jan 2, 2025
1 parent f5237f5 commit 939a513
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('ControlButtons', () => {
[{isEditing: true}, []],
])('renders the right buttons depending on props (%s)', (overrides, buttonTitles) => {
const params = {...defaultParams, ...overrides};
const {getByTitle, queryByTitle} = render(<ControlButtons {...params} />);
const {getByTitle, queryByTitle} = render(withTheme(<ControlButtons {...params} />));
// check that the relevant buttons are present
buttonTitles.forEach(button => expect(getByTitle(button)).not.toBe(null));

Expand Down

0 comments on commit 939a513

Please sign in to comment.