Skip to content

Commit

Permalink
Remove unnecessary act calls
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongarciah committed Jun 21, 2024
1 parent e42bf4c commit bb99a64
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/mui-styles/src/makeStyles/makeStyles.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { expect } from 'chai';
import * as React from 'react';
import PropTypes from 'prop-types';
import { SheetsRegistry } from 'jss';
import { act } from 'react-dom/test-utils';
import { createRenderer, screen, renderHook, fireEvent } from '@mui/internal-test-utils';
import { createTheme } from '@mui/material/styles';
import createGenerateClassName from '../createGenerateClassName';
Expand Down Expand Up @@ -566,9 +565,7 @@ describe('makeStyles', () => {
background-color: black;
}`);

act(() => {
fireEvent.change(screen.getByLabelText('color'), { target: { value: 'blue' } });
});
fireEvent.change(screen.getByLabelText('color'), { target: { value: 'blue' } });

expect(sheetsRegistry.toString()).to.equal(
`.makeStyles-root-4 {
Expand All @@ -577,10 +574,8 @@ describe('makeStyles', () => {
}`,
);

act(() => {
fireEvent.change(screen.getByLabelText('background-color'), {
target: { value: 'green' },
});
fireEvent.change(screen.getByLabelText('background-color'), {
target: { value: 'green' },
});

expect(sheetsRegistry.toString()).to.equal(
Expand Down

0 comments on commit bb99a64

Please sign in to comment.