• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 11383679391

17 Oct 2024 11:05AM UTC coverage: 90.59% (-0.6%) from 91.148%
11383679391

Pull #1988

github

PooyaRaki
rename retryAfter to retryAfterMs, change runMigraiton condition, remove rudundant params
Pull Request #1988: OrmMigrationAndLogger

2654 of 3258 branches covered (81.46%)

Branch coverage included in aggregate %.

89 of 159 new or added lines in 17 files covered. (55.97%)

8802 of 9388 relevant lines covered (93.76%)

409.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/datasources/db/v2/test.postgres-database.module.ts
1
import { Module } from '@nestjs/common';
102✔
2
import { PostgresDatabaseService } from '@/datasources/db/v2/postgres-database.service';
102✔
3
import type { DataSource } from 'typeorm';
4

5
export const postgresDataSourceMock = {
102✔
6
  query: jest.fn(),
7
  runMigrations: jest.fn(),
8
  initialize: jest.fn(),
9
} as jest.MockedObjectDeep<DataSource>;
10

11
export const postgresDatabaseServiceMock = {
102✔
NEW
12
  getDataSource: jest.fn().mockImplementation(() => postgresDataSourceMock),
×
13
  isInitialized: jest.fn(),
14
  initializeDatabaseConnection: jest
15
    .fn()
NEW
16
    .mockImplementation(() => postgresDataSourceMock),
×
17
  destroyDatabaseConnection: jest.fn(),
18
  getRepository: jest.fn(),
19
  transaction: jest.fn(),
20
  getTransactionRunner: jest.fn(),
21
} as jest.MockedObjectDeep<PostgresDatabaseService>;
22

23
@Module({
24
  providers: [
25
    {
26
      provide: PostgresDatabaseService,
27
      useFactory: (): jest.MockedObjectDeep<PostgresDatabaseService> => {
28
        return jest.mocked(postgresDatabaseServiceMock);
2✔
29
      },
30
    },
31
  ],
32
  exports: [PostgresDatabaseService],
33
})
34
export class TestPostgresDatabaseModuleV2 {}
102✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc