-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from ATOR-Development/external_reverts
Graceful handling on external errors when validator is interacting with blockchains
- Loading branch information
Showing
36 changed files
with
2,000 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Test, TestingModule } from '@nestjs/testing' | ||
import { BullModule } from '@nestjs/bullmq' | ||
import { ConfigModule } from '@nestjs/config' | ||
import { MongooseModule } from '@nestjs/mongoose' | ||
import { BalancesService } from './balances.service' | ||
import { BalancesData, BalancesDataSchema } from './schemas/balances-data' | ||
|
||
describe('BalancesService', () => { | ||
let service: BalancesService | ||
|
||
beforeEach(async () => { | ||
const module: TestingModule = await Test.createTestingModule({ | ||
imports: [ | ||
ConfigModule.forRoot(), | ||
MongooseModule.forRoot( | ||
'mongodb://localhost/validATOR-balances-service-tests', | ||
), | ||
MongooseModule.forFeature([ | ||
{ | ||
name: BalancesData.name, | ||
schema: BalancesDataSchema, | ||
}, | ||
]), | ||
], | ||
providers: [BalancesService], | ||
}).compile() | ||
|
||
service = module.get<BalancesService>(BalancesService) | ||
}) | ||
|
||
it('should be defined', () => { | ||
expect(service).toBeDefined() | ||
}) | ||
}) |
Oops, something went wrong.