Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Convert HiddenCSS tests to testing-library #27019

Merged
merged 1 commit into from
Jun 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions packages/material-ui/src/Hidden/HiddenCss.test.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import * as React from 'react';
import { expect } from 'chai';
import { createMount, createClientRender } from 'test/utils';
import { createClientRender } from 'test/utils';
import HiddenCss from './HiddenCss';
import { createTheme, ThemeProvider } from '../styles';
import classes from './hiddenCssClasses';

const TestChild = () => <div data-testid="test-child">bar</div>;

describe('<HiddenCss />', () => {
/**
* @type {ReturnType<typeof createMount>}
*/
const mount = createMount();
const render = createClientRender();

describe('the generated class names', () => {
Expand Down Expand Up @@ -140,7 +136,7 @@ describe('<HiddenCss />', () => {

it('warns about excess props (potentially undeclared breakpoints)', () => {
expect(() => {
mount(
render(
<HiddenCss xxlUp>
<div />
</HiddenCss>,
Expand Down