Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit

Permalink
fix: tests for filterblock updated and config for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvente committed Feb 15, 2024
1 parent dc14183 commit 01aae4f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
exports[`FilteredBlock Component snapshot 1`] = `
<div>
<button
class="d-flex flex-column w-100 align-items-start p-3"
class="d-flex flex-column w-100 align-items-start p-3 btn btn-tertiary"
data-testid="filter-block-item"
variant="tertiary"
type="button"
>
<span
class="h5 text-left"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import '@testing-library/jest-dom';
import FilterBlock from '.';

jest.unmock('@edx/frontend-platform/i18n');
jest.unmock('@edx/paragon');
jest.unmock('@edx/paragon/icons');
jest.unmock('@openedx/paragon');
jest.unmock('@openedx/paragon/icons');

describe('FilteredBlock Component', () => {
const mockOnBlockFilterClick = jest.fn();
Expand Down
6 changes: 6 additions & 0 deletions src/setupTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,9 @@ jest.mock('react-redux', () => {
jest.mock('frontend-components-tinymce-advanced-plugins', () => ({
a11ycheckerCss: '',
}));

global.ResizeObserver = jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
}))

0 comments on commit 01aae4f

Please sign in to comment.