1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00
metamask-extension/ui/pages/swaps/smart-transaction-status/smart-transaction-status.test.js

26 lines
784 B
JavaScript
Raw Normal View History

import React from 'react';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import {
renderWithProvider,
createSwapsMockStore,
setBackgroundConnection,
} from '../../../../test/jest';
import SmartTransactionStatus from '.';
const middleware = [thunk];
setBackgroundConnection({
stopPollingForQuotes: jest.fn(),
setBackgroundSwapRouteState: jest.fn(),
});
describe('SmartTransactionStatus', () => {
it('renders the component with initial props', () => {
const store = configureMockStore(middleware)(createSwapsMockStore());
const { getByText } = renderWithProvider(<SmartTransactionStatus />, store);
expect(getByText('Optimizing gas...')).toBeInTheDocument();
expect(getByText('Close')).toBeInTheDocument();
});
});