A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/components/app/edit-gas-fee-popover/network-statistics/network-statistics.test.js

33 lines
992 B

import React from 'react';
import { renderWithProvider } from '../../../../../test/jest';
import { GasFeeContext } from '../../../../contexts/gasFee';
import configureStore from '../../../../store/store';
import NetworkStatistics from './network-statistics';
const renderComponent = (gasFeeEstimates) => {
const store = configureStore({});
return renderWithProvider(
<GasFeeContext.Provider value={{ gasFeeEstimates }}>
<NetworkStatistics />
</GasFeeContext.Provider>,
store,
);
};
describe('NetworkStatistics', () => {
it('should render the latest base fee', () => {
const { getByText } = renderComponent({
estimatedBaseFee: '50.0112',
});
expect(getByText('50.0112 GWEI')).toBeInTheDocument();
});
it('should render the latest priority fee range', () => {
const { getByText } = renderComponent({
latestPriorityFeeRange: ['1.000001668', '2.5634234'],
});
expect(getByText('1 - 2.6 GWEI')).toBeInTheDocument();
});
});