From dc35992f1ca7c09c3d5231f8c714925ddd5f5b80 Mon Sep 17 00:00:00 2001 From: Cyrille <1618640+cyri113@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:10:44 +0100 Subject: [PATCH] fix testcase --- src/rpc.service.spec.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/rpc.service.spec.ts b/src/rpc.service.spec.ts index 796052d..27db1d9 100644 --- a/src/rpc.service.spec.ts +++ b/src/rpc.service.spec.ts @@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { ConfigService } from '@nestjs/config'; import { RpcService } from './rpc.service'; -import { mainnet, sepolia, arbitrumSepolia } from 'viem/chains'; +import { arbitrum, sepolia, baseSepolia } from 'viem/chains'; describe('RpcService', () => { let rpcService: RpcService; @@ -37,17 +37,13 @@ describe('RpcService', () => { it('should initialize transport configuration correctly', async () => { await rpcService.onModuleInit(); - // Check that transport is configured correctly for mainnet - const mainnetTransport = rpcService['transport'][mainnet.id]; - expect(mainnetTransport).toBeDefined(); - - // Check that transport is configured correctly for sepolia - const sepoliaTransport = rpcService['transport'][sepolia.id]; - expect(sepoliaTransport).toBeDefined(); - - // Check that transport is configured correctly for arbitrumSepolia - const arbitrumTransport = rpcService['transport'][arbitrumSepolia.id]; + // Check that transport is configured correctly for arbitrum + const arbitrumTransport = rpcService['transport'][arbitrum.id]; expect(arbitrumTransport).toBeDefined(); + + // Check that transport is configured correctly for baseSepolia + const baseSepoliaTransport = rpcService['transport'][baseSepolia.id]; + expect(baseSepoliaTransport).toBeDefined(); }); }); @@ -58,7 +54,7 @@ describe('RpcService', () => { }); it('should return the transport for a valid chain ID', () => { - const transport = rpcService.getTransport(mainnet.id); + const transport = rpcService.getTransport(arbitrum.id); expect(transport).toBeDefined(); });