From 1e92edeae4970c280acd5d8a06755333b06f7e19 Mon Sep 17 00:00:00 2001 From: Inga <52715130+inga-lovinde@users.noreply.github.com> Date: Sat, 9 Dec 2023 01:26:43 +0000 Subject: [PATCH] set tab width to 4 --- .prettierrc | 1 + src/app.controller.spec.ts | 24 ++++++++++++------------ src/app.controller.ts | 10 +++++----- src/app.module.ts | 6 +++--- src/app.service.ts | 6 +++--- src/main.ts | 4 ++-- test/app.e2e-spec.ts | 28 ++++++++++++++-------------- 7 files changed, 40 insertions(+), 39 deletions(-) diff --git a/.prettierrc b/.prettierrc index dcb7279..420ffc9 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,5 @@ { + "tabWidth": 4, "singleQuote": true, "trailingComma": "all" } \ No newline at end of file diff --git a/src/app.controller.spec.ts b/src/app.controller.spec.ts index d22f389..2552ec5 100644 --- a/src/app.controller.spec.ts +++ b/src/app.controller.spec.ts @@ -3,20 +3,20 @@ import { AppController } from './app.controller'; import { AppService } from './app.service'; describe('AppController', () => { - let appController: AppController; + let appController: AppController; - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile(); + beforeEach(async () => { + const app: TestingModule = await Test.createTestingModule({ + controllers: [AppController], + providers: [AppService], + }).compile(); - appController = app.get(AppController); - }); + appController = app.get(AppController); + }); - describe('root', () => { - it('should return "Hello World!"', () => { - expect(appController.getHello()).toBe('Hello World!'); + describe('root', () => { + it('should return "Hello World!"', () => { + expect(appController.getHello()).toBe('Hello World!'); + }); }); - }); }); diff --git a/src/app.controller.ts b/src/app.controller.ts index cce879e..a325e8b 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -3,10 +3,10 @@ import { AppService } from './app.service'; @Controller() export class AppController { - constructor(private readonly appService: AppService) {} + constructor(private readonly appService: AppService) {} - @Get() - getHello(): string { - return this.appService.getHello(); - } + @Get() + getHello(): string { + return this.appService.getHello(); + } } diff --git a/src/app.module.ts b/src/app.module.ts index e0d67c3..c6d9fb6 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -3,9 +3,9 @@ import { AppController } from './app.controller'; import { AppService } from './app.service'; @Module({ - imports: [], - controllers: [AppController], - providers: [AppService], + imports: [], + controllers: [AppController], + providers: [AppService], }) // eslint-disable-next-line @typescript-eslint/no-extraneous-class export class AppModule {} diff --git a/src/app.service.ts b/src/app.service.ts index 927d7cc..61b7a5b 100644 --- a/src/app.service.ts +++ b/src/app.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; @Injectable() export class AppService { - getHello(): string { - return 'Hello World!'; - } + getHello(): string { + return 'Hello World!'; + } } diff --git a/src/main.ts b/src/main.ts index 23f3240..25f3010 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AppModule); - await app.listen(3000); + const app = await NestFactory.create(AppModule); + await app.listen(3000); } void bootstrap(); diff --git a/test/app.e2e-spec.ts b/test/app.e2e-spec.ts index 9ceebc4..bd17625 100644 --- a/test/app.e2e-spec.ts +++ b/test/app.e2e-spec.ts @@ -4,21 +4,21 @@ import request from 'supertest'; import { AppModule } from './../src/app.module'; describe('AppController (e2e)', () => { - let app: INestApplication; + let app: INestApplication; - beforeEach(async () => { - const moduleFixture: TestingModule = await Test.createTestingModule({ - imports: [AppModule], - }).compile(); + beforeEach(async () => { + const moduleFixture: TestingModule = await Test.createTestingModule({ + imports: [AppModule], + }).compile(); - app = moduleFixture.createNestApplication(); - await app.init(); - }); + app = moduleFixture.createNestApplication(); + await app.init(); + }); - it('/ (GET)', () => { - return request(app.getHttpServer()) - .get('/') - .expect(200) - .expect('Hello World!'); - }); + it('/ (GET)', () => { + return request(app.getHttpServer()) + .get('/') + .expect(200) + .expect('Hello World!'); + }); });