-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38b03f8
commit 067adec
Showing
11 changed files
with
608 additions
and
40 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,19 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { GardalandService } from './gardaland.service'; | ||
import { HttpModule } from '@nestjs/axios'; | ||
import { ConfigModule } from '@nestjs/config'; | ||
import { AioTransferServiceService } from '../../_services/aio/transfer-service/aio-transfer-service.service'; | ||
|
||
@Module({ | ||
imports: [ | ||
HttpModule, | ||
ConfigModule.forRoot({ | ||
envFilePath: '.env', | ||
cache: false, | ||
ignoreEnvFile: false, | ||
}), | ||
], | ||
providers: [GardalandService, AioTransferServiceService], | ||
exports: [GardalandService], | ||
}) | ||
export class GardalandModule {} |
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,31 @@ | ||
import { Test, TestingModule } from '@nestjs/testing'; | ||
import { GardalandService } from './gardaland.service'; | ||
import { AioTransferServiceService } from '../../_services/aio/transfer-service/aio-transfer-service.service'; | ||
import { HttpModule } from '@nestjs/axios'; | ||
import { ConfigModule } from '@nestjs/config'; | ||
|
||
describe('GardalandService', () => { | ||
let service: GardalandService; | ||
|
||
beforeEach(async () => { | ||
const module: TestingModule = await Test.createTestingModule({ | ||
providers: [GardalandService, AioTransferServiceService], | ||
imports: [HttpModule, ConfigModule.forRoot()], | ||
}).compile(); | ||
|
||
service = module.get<GardalandService>(GardalandService); | ||
}); | ||
|
||
it('should be defined', () => { | ||
expect(service).toBeDefined(); | ||
}); | ||
|
||
it('should return info', () => { | ||
expect(service.getInfo().id).toBeDefined(); | ||
}); | ||
|
||
it('should return a list of POIs', async () => { | ||
const data = await service.getPois(); | ||
expect(data).toBeInstanceOf(Array); | ||
}, 1000 * 60); | ||
}); |
Oops, something went wrong.