Skip to content

Commit

Permalink
style: apply import sorting prettier plugin on test files
Browse files Browse the repository at this point in the history
csm-thu committed Dec 1, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 9d776ad commit 28c3e2f
Showing 13 changed files with 5 additions and 21 deletions.
1 change: 0 additions & 1 deletion jestSetup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import '@testing-library/jest-dom';
import { toHaveDirtyInputClass } from './tests/extensions';

2 changes: 0 additions & 2 deletions tests/MuiComponentsTesting/AutoCompleteTesting.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import { getByRole, queryByText } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

import { getByDataCy } from '../utils';

export class AutoCompleteTesting {
3 changes: 1 addition & 2 deletions tests/MuiComponentsTesting/ButtonTesting.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import { getByDataCy } from '../utils';
import userEvent from '@testing-library/user-event';
import { getByDataCy } from '../utils';

export class ButtonTesting {
constructor({ dataCy }) {
1 change: 0 additions & 1 deletion tests/MuiComponentsTesting/ChipTesting.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import { queryByTestId } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { getByDataCy } from '../utils';
1 change: 0 additions & 1 deletion tests/MuiComponentsTesting/ContainerTesting.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import userEvent from '@testing-library/user-event';
import { getByDataCy } from '../utils';

3 changes: 1 addition & 2 deletions tests/MuiComponentsTesting/MockTheme.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Source: https://stackoverflow.com/questions/58627085/jest-manual-mock-for-themeprovider

import React from 'react';
import PropTypes from 'prop-types';
import { createTheme } from '@mui/material/styles';
import { ThemeProvider } from '@mui/material';
import { createTheme } from '@mui/material/styles';

const MockTheme = ({ children }) => {
const theme = createTheme({});
2 changes: 0 additions & 2 deletions tests/MuiComponentsTesting/RadioGroupTesting.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import { queryAllByRole } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

import { getByDataCy } from '../utils';

export class RadioGroupTesting {
2 changes: 0 additions & 2 deletions tests/MuiComponentsTesting/SelectTesting.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import { getByRole, queryByText } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

import { getByDataCy } from '../utils';

export class SelectTesting {
3 changes: 1 addition & 2 deletions tests/MuiComponentsTesting/SliderTesting.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import { getByDataCy } from '../utils';
import userEvent from '@testing-library/user-event';
import { getByDataCy } from '../utils';

export class SliderTesting {
constructor({ dataCy }) {
3 changes: 1 addition & 2 deletions tests/MuiComponentsTesting/TextFieldTesting.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import { getByDataCy, getById } from '../utils';
import { getByRole } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { getByDataCy, getById } from '../utils';

export class TextFieldTesting {
constructor({ dataCy, id }) {
1 change: 0 additions & 1 deletion tests/MuiComponentsTesting/TypographyTesting.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import { getByDataCy } from '../utils';

export class TypographyTesting {
1 change: 0 additions & 1 deletion tests/extensions/toHaveDirtyInputClass.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import '@testing-library/jest-dom';

export function toHaveDirtyInputClass(received) {
3 changes: 1 addition & 2 deletions tests/utils/renderInMuiThemeProvider.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import React from 'react';
import { render } from '@testing-library/react';
import React from 'react';
import { MockTheme } from '../MuiComponentsTesting';

export const renderInMuiThemeProvider = (children) => {

0 comments on commit 28c3e2f

Please sign in to comment.