Skip to content

Commit

Permalink
fix code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Aug 24, 2023
1 parent 13c0807 commit e370577
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import { chainDbMock, safeDbMock, userDbMock } from '../../mock';
import { SafeRepository } from '../safe/safe.repository';
import { plainToInstance } from 'class-transformer';
import { Safe } from '../safe/entities/safe.entity';
import { CreateTransactionRequestDto } from './dto';
import { ChainRepository } from '../chain/chain.repository';
import { Chain } from '../chain/entities/chain.entity';
// import { IndexerClient } from '../../shared/services';
// import { AccountInfo } from '../../common/dtos';
const mockGetAuthInfo = jest.fn().mockReturnValue(userDbMock[0]);
jest.mock('../../utils/common.util', () => {
return jest.fn().mockImplementation(() => {
Expand All @@ -21,7 +18,6 @@ describe('MultisigTransactionService', () => {
let service: MultisigTransactionService;
let safeRepo: SafeRepository;
let chainRepos: ChainRepository;
// let indexerClient: IndexerClient;

beforeEach(async () => {
const module: TestingModule =
Expand All @@ -33,7 +29,6 @@ describe('MultisigTransactionService', () => {

safeRepo = module.get<SafeRepository>(SafeRepository);
chainRepos = module.get<ChainRepository>(ChainRepository);
// indexerClient = module.get<IndexerClient>(IndexerClient);
});

it('should be defined', () => {
Expand All @@ -42,25 +37,13 @@ describe('MultisigTransactionService', () => {

describe('createMultisigTransaction', () => {
it('should create multisig tx successfully', async () => {
// const request: CreateTransactionRequestDto = {
// from: 'aura1p8zl3nz73k998sjj4hy8eg8at6zuz6detxelg5',
// internalChainId: 22,
// };

jest
.spyOn(safeRepo, 'getSafeByAddress')
.mockResolvedValue(plainToInstance(Safe, safeDbMock[0]));

jest
.spyOn(chainRepos, 'findChain')
.mockResolvedValue(plainToInstance(Chain, chainDbMock[0]));

// jest.spyOn(indexerClient, 'getAccount').mockResolvedValue(
// plainToInstance(AccountInfo, {
// accountNumber: 1,
// sequence: 2,
// }),
// );
});
});
});

0 comments on commit e370577

Please sign in to comment.