Skip to content

Commit ac9b783

Browse files
committed
chore: 💚 Run biome check --fix to update code
1 parent 03f55e5 commit ac9b783

File tree

6 files changed

+28
-51
lines changed

6 files changed

+28
-51
lines changed

jest.config.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
import type { Config } from 'jest';
2-
import { pathsToModuleNameMapper } from 'ts-jest';
1+
import type { Config } from "jest";
2+
import { pathsToModuleNameMapper } from "ts-jest";
33

4-
import { compilerOptions } from './tsconfig.json';
4+
import { compilerOptions } from "./tsconfig.json";
55

66
const config: Config = {
7-
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
8-
preset: 'ts-jest',
9-
testEnvironment: 'node',
10-
roots: ['<rootDir>/src'],
11-
testMatch: ['**/?(*.)+(spec|test).[tj]s?(x)'],
12-
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
13-
transform: { '^.+\\.(t|j)s$': 'ts-jest' },
7+
moduleFileExtensions: ["ts", "js", "json", "node"],
8+
preset: "ts-jest",
9+
testEnvironment: "node",
10+
roots: ["<rootDir>/src"],
11+
testMatch: ["**/?(*.)+(spec|test).[tj]s?(x)"],
12+
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: "<rootDir>/" }),
13+
transform: { "^.+\\.(t|j)s$": "ts-jest" },
1414
clearMocks: true,
1515
collectCoverage: true,
16-
coverageDirectory: 'coverage',
16+
coverageDirectory: "coverage",
1717
collectCoverageFrom: [
18-
'src/**/*.ts',
19-
'!src/**/*.module.ts', // Exclude module files if they don't contain significant logic
20-
'!src/main.ts', // Exclude the main bootstrap file
21-
'!src/**/*.(interface|enum).ts', // Exclude interfaces and enums if you don't want them in coverage
22-
'!**/node_modules/**',
23-
'!**/config/**',
18+
"src/**/*.ts",
19+
"!src/**/*.module.ts", // Exclude module files if they don't contain significant logic
20+
"!src/main.ts", // Exclude the main bootstrap file
21+
"!src/**/*.(interface|enum).ts", // Exclude interfaces and enums if you don't want them in coverage
22+
"!**/node_modules/**",
23+
"!**/config/**",
2424
],
25-
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
26-
modulePathIgnorePatterns: ['<rootDir>/dist/'],
27-
moduleDirectories: ['node_modules'],
25+
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
26+
modulePathIgnorePatterns: ["<rootDir>/dist/"],
27+
moduleDirectories: ["node_modules"],
2828
};
2929

3030
export default config;

src/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Module } from "@nestjs/common";
22
import { ConfigModule } from "@nestjs/config";
3+
import { APP_GUARD } from "@nestjs/core";
34
import { ThrottlerGuard, ThrottlerModule } from "@nestjs/throttler";
45

56
import configuration from "@/config";
6-
import { APP_GUARD } from "@nestjs/core";
77
import { HealthCheckModule } from "@/modules/healthCheck/healthCheck.module";
88

99
@Module({

src/core/core.interface.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ export class ServiceResponse<T = null> {
99
responseObject: T;
1010
statusCode: number;
1111

12-
constructor(
13-
status: ResponseStatus,
14-
message: string,
15-
responseObject: T,
16-
statusCode: number,
17-
) {
12+
constructor(status: ResponseStatus, message: string, responseObject: T, statusCode: number) {
1813
this.success = status === ResponseStatus.Success;
1914
this.message = message;
2015
this.responseObject = responseObject;

src/core/core.module.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,15 @@ import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
66
export class CoreModule {
77
static setupSecurity(app: INestApplication): void {
88
app.enableCors();
9-
new Logger("SecuritySetup").log(
10-
"CORS and Helmet configurations have been applied.",
11-
);
9+
new Logger("SecuritySetup").log("CORS and Helmet configurations have been applied.");
1210
}
1311

14-
static setupSwagger(
15-
app: INestApplication,
16-
configService: ConfigService,
17-
): void {
12+
static setupSwagger(app: INestApplication, configService: ConfigService): void {
1813
const environment = configService.get<string>("NODE_ENV");
1914
const logger = new Logger("SwaggerSetup");
2015

2116
if (environment === "development") {
22-
const url = configService.get<string>(
23-
"HOST_URL",
24-
"http://localhost:8080",
25-
);
17+
const url = configService.get<string>("HOST_URL", "http://localhost:8080");
2618

2719
const config = new DocumentBuilder()
2820
.addBearerAuth()

src/modules/healthCheck/healthCheck.controller.spec.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { ConfigService } from "@nestjs/config";
2-
import {
3-
HealthCheckResult,
4-
HealthCheckService,
5-
MicroserviceHealthIndicator,
6-
} from "@nestjs/terminus";
2+
import { HealthCheckResult, HealthCheckService, MicroserviceHealthIndicator } from "@nestjs/terminus";
73
import { Test, TestingModule } from "@nestjs/testing";
84

95
import { HealthCheckController } from "@/modules/healthCheck/healthCheck.controller";
@@ -27,9 +23,7 @@ describe("HealthCheckController", () => {
2723
],
2824
}).compile();
2925

30-
healthCheckController = module.get<HealthCheckController>(
31-
HealthCheckController,
32-
);
26+
healthCheckController = module.get<HealthCheckController>(HealthCheckController);
3327
healthService = module.get<HealthCheckService>(HealthCheckService);
3428
});
3529

src/modules/healthCheck/healthCheck.controller.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ import { Controller, Get } from "@nestjs/common";
22
import { ConfigService } from "@nestjs/config";
33
import { TcpClientOptions, Transport } from "@nestjs/microservices";
44
import { ApiTags } from "@nestjs/swagger";
5-
import {
6-
HealthCheck,
7-
HealthCheckService,
8-
MicroserviceHealthIndicator,
9-
} from "@nestjs/terminus";
5+
import { HealthCheck, HealthCheckService, MicroserviceHealthIndicator } from "@nestjs/terminus";
106

117
@ApiTags("health-check")
128
@Controller("health-check")

0 commit comments

Comments
 (0)