Skip to content

Commit

Permalink
[test] Remove view option from Event in Snackbar tests (#33555)
Browse files Browse the repository at this point in the history
* remove view property

* run CI
  • Loading branch information
ZeeshanTamboli authored Jul 21, 2022
1 parent d99aa8e commit ac89270
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/mui-material/src/Snackbar/Snackbar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('<Snackbar />', () => {
const handleClose = spy();
render(<Snackbar open onClose={handleClose} message="message" />);

const event = new window.Event('click', { view: window, bubbles: true, cancelable: true });
const event = new window.Event('click', { bubbles: true, cancelable: true });
document.body.dispatchEvent(event);

expect(handleClose.callCount).to.equal(1);
Expand Down Expand Up @@ -437,7 +437,6 @@ describe('<Snackbar />', () => {

act(() => {
const bEvent = new window.Event('blur', {
view: window,
bubbles: false,
cancelable: false,
});
Expand All @@ -452,7 +451,6 @@ describe('<Snackbar />', () => {

act(() => {
const fEvent = new window.Event('focus', {
view: window,
bubbles: false,
cancelable: false,
});
Expand Down Expand Up @@ -481,7 +479,7 @@ describe('<Snackbar />', () => {
);

act(() => {
const event = new window.Event('blur', { view: window, bubbles: false, cancelable: false });
const event = new window.Event('blur', { bubbles: false, cancelable: false });
window.dispatchEvent(event);
});

Expand Down

0 comments on commit ac89270

Please sign in to comment.