2022-09-16 21:05:21 +02:00
|
|
|
import React from 'react';
|
|
|
|
import { renderWithProvider } from '../../../../test/jest';
|
|
|
|
import configureStore from '../../../store/store';
|
|
|
|
import mockState from '../../../../test/data/mock-state.json';
|
|
|
|
import ExperimentalTab from './experimental-tab.component';
|
|
|
|
|
2023-02-23 17:39:48 +01:00
|
|
|
const render = (overrideMetaMaskState) => {
|
2022-09-16 21:05:21 +02:00
|
|
|
const store = configureStore({
|
|
|
|
metamask: {
|
|
|
|
...mockState.metamask,
|
2023-02-23 17:39:48 +01:00
|
|
|
...overrideMetaMaskState,
|
2022-09-16 21:05:21 +02:00
|
|
|
},
|
|
|
|
});
|
|
|
|
return renderWithProvider(<ExperimentalTab />, store);
|
|
|
|
};
|
|
|
|
|
|
|
|
describe('ExperimentalTab', () => {
|
2022-12-08 19:37:06 +01:00
|
|
|
it('renders ExperimentalTab component without error', () => {
|
|
|
|
expect(() => {
|
|
|
|
render();
|
|
|
|
}).not.toThrow();
|
2022-09-16 21:05:21 +02:00
|
|
|
});
|
2023-02-23 17:39:48 +01:00
|
|
|
|
|
|
|
describe('with desktop enabled', () => {
|
|
|
|
it('renders ExperimentalTab component without error', () => {
|
|
|
|
const { container } = render({ desktopEnabled: true });
|
|
|
|
expect(container).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|
2022-09-16 21:05:21 +02:00
|
|
|
});
|