Skip to content

Commit

Permalink
feat: mountWithTheme wrapper for cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
QuaidBartolomei committed Oct 9, 2021
1 parent f1938c2 commit ef4a8d3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/models/test-utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { mount } from '@cypress/react';
import { ThemeProvider } from '@material-ui/core';
import * as React from 'react';

import appTheme from '../theme';

// eslint-disable-next-line import/prefer-default-export
export function mountWithTheme(element) {
return mount(<ThemeProvider theme={appTheme}>{element}</ThemeProvider>);
}

0 comments on commit ef4a8d3

Please sign in to comment.