1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Remove unnecessary test (#17181)

This test was testing a function that was only present in the test
module.

The function under test was mistakenly moved here when it was
discovered that it wasn't being used elsewhere, under the assumption
that it was used in these tests. I hadn't realized it was being tested
directly.
This commit is contained in:
Mark Stacey 2023-01-17 19:57:41 -03:30 committed by GitHub
parent 48dd819763
commit 3c52e80713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,7 @@
import nock from 'nock'; import nock from 'nock';
import { deferredPromise } from '../../lib/util'; import { deferredPromise } from '../../lib/util';
import { NETWORK_TO_NAME_MAP } from '../../../../shared/constants/network';
import NetworkController, { NETWORK_EVENTS } from './network-controller'; import NetworkController, { NETWORK_EVENTS } from './network-controller';
const getNetworkDisplayName = (key) => NETWORK_TO_NAME_MAP[key];
/** /**
* Construct a successful RPC response. * Construct a successful RPC response.
* *
@ -198,27 +195,4 @@ describe('NetworkController', () => {
}); });
}); });
}); });
describe('utils', () => {
it('getNetworkDisplayName should return the correct network name', () => {
const tests = [
{
input: 'mainnet',
expected: 'Ethereum Mainnet',
},
{
input: 'goerli',
expected: 'Goerli',
},
{
input: 'sepolia',
expected: 'Sepolia',
},
];
tests.forEach(({ input, expected }) =>
expect(getNetworkDisplayName(input)).toStrictEqual(expected),
);
});
});
}); });