1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 12:56:01 +01:00
metamask-extension/ui/components/app/advanced-gas-controls/advanced-gas-controls.test.js
2022-12-09 00:07:06 +05:30

28 lines
823 B
JavaScript

import React from 'react';
import configureMockStore from 'redux-mock-store';
import { renderWithProvider } from '../../../../test/jest/rendering';
import AdvancedGasControls from './advanced-gas-controls.component';
const renderComponent = (props) => {
const store = configureMockStore([])({
metamask: { identities: [], provider: {} },
});
return renderWithProvider(<AdvancedGasControls {...props} />, store);
};
describe('AdvancedGasControls Component', () => {
it('should render correctly', () => {
expect(() => {
renderComponent();
}).not.toThrow();
});
it('should render gasLimit and gasPrice inputs', () => {
const { queryByText } = renderComponent();
expect(queryByText('Gas limit')).toBeInTheDocument();
expect(queryByText('Gas price')).toBeInTheDocument();
});
});