Skip to content

Commit

Permalink
feat(modal): add comment about jest mock
Browse files Browse the repository at this point in the history
  • Loading branch information
andioneto committed Oct 5, 2021
1 parent f6e1281 commit 7b5dc97
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {BaseModal, initStyles} from '../stories/customization.stories';
expect.extend(matchers);

jest.mock('@twilio-paste/modal-dialog-primitive', () => {
// Mocking the portal as a div so it renders within the body of the rendered test fragment, rather than using Portal behavior.
const actual = jest.requireActual('@twilio-paste/modal-dialog-primitive');
const {forwardRef: mockForwardRef} = jest.requireActual('react');
const MockModalDialogPrimitiveOverlay = mockForwardRef(
Expand Down

0 comments on commit 7b5dc97

Please sign in to comment.