mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Sync removeNetworkConfiguration tests w/ core (#19427)
This makes it easier to visually compare differences in the NetworkController unit tests between core and this repo.
This commit is contained in:
parent
987c08f75a
commit
b8b0de78a3
@ -4544,26 +4544,25 @@ describe('NetworkController', () => {
|
||||
});
|
||||
|
||||
describe('removeNetworkConfigurations', () => {
|
||||
it('removes a network configuration', async () => {
|
||||
const networkConfigurationId = 'testNetworkConfigurationId';
|
||||
it('remove a network configuration', async () => {
|
||||
const testNetworkConfigurationId = 'testNetworkConfigurationId';
|
||||
await withController(
|
||||
{
|
||||
state: {
|
||||
networkConfigurations: {
|
||||
[networkConfigurationId]: {
|
||||
id: networkConfigurationId,
|
||||
rpcUrl: 'https://test-rpc-url',
|
||||
[testNetworkConfigurationId]: {
|
||||
rpcUrl: 'https://rpc-url.com',
|
||||
ticker: 'old_rpc_ticker',
|
||||
nickname: 'old_rpc_chainName',
|
||||
nickname: 'old_rpc_nickname',
|
||||
rpcPrefs: { blockExplorerUrl: 'testchainscan.io' },
|
||||
chainId: '0x1',
|
||||
chainId: toHex(1337),
|
||||
id: testNetworkConfigurationId,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
async ({ controller }) => {
|
||||
controller.removeNetworkConfiguration(networkConfigurationId);
|
||||
|
||||
controller.removeNetworkConfiguration(testNetworkConfigurationId);
|
||||
expect(
|
||||
controller.store.getState().networkConfigurations,
|
||||
).toStrictEqual({});
|
||||
@ -4583,7 +4582,7 @@ describe('NetworkController', () => {
|
||||
ticker: 'old_rpc_ticker',
|
||||
nickname: 'old_rpc_nickname',
|
||||
rpcPrefs: { blockExplorerUrl: 'testchainscan.io' },
|
||||
chainId: '0x1',
|
||||
chainId: toHex(1337),
|
||||
id: testNetworkConfigurationId,
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user