Skip to content

Commit

Permalink
Merge pull request #28 from rudemex/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rudemex authored Nov 9, 2023
2 parents 79e0fd2 + b0351e0 commit 297dc41
Show file tree
Hide file tree
Showing 11 changed files with 363 additions and 236 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"private": true,
"license": "MIT",
"scripts": {
"clean": "rimraf coverage dist node_modules junit.xml test-report.xml yarn.lock package-lock.json",
"prebuild": "rimraf dist",
"build": "cross-env NODE_ENV=build nest build",
"start": "cross-env NODE_ENV=production node dist/main",
Expand Down Expand Up @@ -63,7 +64,7 @@
"@nestjs/swagger": "^7.1.12",
"@tresdoce-nestjs-toolkit/archetype": "^1.0.2",
"@tresdoce-nestjs-toolkit/http-client": "^1.0.2",
"@tresdoce-nestjs-toolkit/paas": "^1.0.2",
"@tresdoce-nestjs-toolkit/paas": "^1.0.3",
"class-transformer": "^0.5.1",
"compression": "^1.7.4",
"cookie-parser": "^1.4.6",
Expand Down
2 changes: 1 addition & 1 deletion src/__test__/app.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('AppController', () => {
expect(await appController.getTestEnv()).toBe(configService.get('TEST_KEY'));
});

it('should return custom util', () => {
it('should return custom util', async () => {
expect(appController.getMyUtil()).toBe('this is an util');
});
});
Expand Down
3 changes: 2 additions & 1 deletion src/app.controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
import { SkipTrace } from '@tresdoce-nestjs-toolkit/tracing';

import { AppService } from './app.service';

@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
Expand Down
9 changes: 6 additions & 3 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { Module } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';

import { ConfigModule } from '@nestjs/config';
import { ArchetypeModule } from '@tresdoce-nestjs-toolkit/archetype';
import { HealthModule, ResponseInterceptor } from '@tresdoce-nestjs-toolkit/paas';
import {
HealthModule,
ResponseInterceptor,
TracingModule,
TracingInterceptor,
} from '@tresdoce-nestjs-toolkit/paas';
import { HttpClientModule } from '@tresdoce-nestjs-toolkit/http-client';
import { TracingModule, TracingInterceptor } from '@tresdoce-nestjs-toolkit/tracing';

import { UtilsModule } from './utils/utils.module';
import { UsersModule } from './users/users.module';
Expand Down
2 changes: 1 addition & 1 deletion src/characters/__test__/characters.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('CharactersController', () => {
jest.clearAllMocks();
});

it('should be defined', () => {
it('should be defined', async () => {
expect(controller).toBeDefined();
});

Expand Down
2 changes: 1 addition & 1 deletion src/characters/services/characters.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class CharactersService {

return data;
} catch (error) /* istanbul ignore next */ {
throw new HttpException(error.message, error.response.status);
throw new HttpException(error.response.data, error.response.status);
}
}
}
Loading

0 comments on commit 297dc41

Please sign in to comment.