Skip to content

Commit

Permalink
fix testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
cyri113 authored Dec 5, 2024
1 parent 2633058 commit dc35992
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/rpc.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Check failure on line 5 in src/rpc.service.spec.ts

View workflow job for this annotation

GitHub Actions / lint

'sepolia' is defined but never used

describe('RpcService', () => {
let rpcService: RpcService;
Expand Down Expand Up @@ -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();
});
});

Expand All @@ -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();
});

Expand Down

0 comments on commit dc35992

Please sign in to comment.