Skip to content

Commit bf89c42

Browse files
Le-CaignecPierreJeanjacquot
authored andcommitted
test: remove tests for experimental networks in IExecConfig
1 parent f345593 commit bf89c42

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

test/lib/e2e/IExecConfig.test.js

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -130,31 +130,6 @@ describe('[IExecConfig]', () => {
130130
);
131131
expect(createConfig).toThrow(errors.ConfigurationError);
132132
});
133-
describe('allowExperimentalNetworks', () => {
134-
test('throw with experimental chains when allowExperimentalNetworks is not enabled', () => {
135-
const createConfig = () =>
136-
new IExecConfig({ ethProvider: 'arbitrum-sepolia-testnet' });
137-
expect(createConfig).toThrow(
138-
new Error('Invalid ethProvider: Invalid provider host name or url'),
139-
);
140-
expect(createConfig).toThrow(errors.ConfigurationError);
141-
});
142-
test('allows experimental chains when allowExperimentalNetworks is enabled', async () => {
143-
const config = new IExecConfig(
144-
{ ethProvider: 'arbitrum-sepolia-testnet' },
145-
{ allowExperimentalNetworks: true },
146-
);
147-
const { provider, signer, chainId } =
148-
await config.resolveContractsClient();
149-
expect(signer).toBeUndefined();
150-
expect(provider).toBeDefined();
151-
expect(provider).toBeInstanceOf(JsonRpcProvider);
152-
expect(chainId).toBe('421614');
153-
const network = await provider.getNetwork();
154-
expect(network.chainId).toBe(421614n);
155-
expect(network.name).toBe('arbitrum-sepolia');
156-
});
157-
});
158133
});
159134

160135
describe('read-only ethProvider from network chainId', () => {
@@ -242,30 +217,6 @@ describe('[IExecConfig]', () => {
242217
);
243218
expect(createConfig).toThrow(errors.ConfigurationError);
244219
});
245-
describe('allowExperimentalNetworks', () => {
246-
test('throw with experimental chains when allowExperimentalNetworks is not enabled', () => {
247-
const createConfig = () => new IExecConfig({ ethProvider: 421614 });
248-
expect(createConfig).toThrow(
249-
new Error('Invalid ethProvider: Invalid provider host name or url'),
250-
);
251-
expect(createConfig).toThrow(errors.ConfigurationError);
252-
});
253-
test('allows experimental chains when allowExperimentalNetworks is enabled', async () => {
254-
const config = new IExecConfig(
255-
{ ethProvider: 421614 },
256-
{ allowExperimentalNetworks: true },
257-
);
258-
const { provider, signer, chainId } =
259-
await config.resolveContractsClient();
260-
expect(signer).toBeUndefined();
261-
expect(provider).toBeDefined();
262-
expect(provider).toBeInstanceOf(JsonRpcProvider);
263-
expect(chainId).toBe('421614');
264-
const network = await provider.getNetwork();
265-
expect(network.chainId).toBe(421614n);
266-
expect(network.name).toBe('arbitrum-sepolia');
267-
});
268-
});
269220
});
270221

271222
describe('read-only ethProvider with API keys', () => {

0 commit comments

Comments
 (0)