Skip to content

Commit

Permalink
Add check path to API
Browse files Browse the repository at this point in the history
  • Loading branch information
devleejb committed Jan 24, 2024
1 parent 0b9bea3 commit aad2ff7
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { WorkspacesModule } from "./workspaces/workspaces.module";
import { WorkspaceUsersModule } from "./workspace-users/workspace-users.module";
import { WorkspaceDocumentsModule } from "./workspace-documents/workspace-documents.module";
import { DocumentsModule } from "./documents/documents.module";
import { CheckModule } from './check/check.module';

@Module({
imports: [
Expand All @@ -19,6 +20,7 @@ import { DocumentsModule } from "./documents/documents.module";
WorkspaceUsersModule,
WorkspaceDocumentsModule,
DocumentsModule,
CheckModule,
],
controllers: [],
providers: [
Expand Down
18 changes: 18 additions & 0 deletions backend/src/check/check.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { CheckController } from './check.controller';

describe('CheckController', () => {
let controller: CheckController;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
controllers: [CheckController],
}).compile();

controller = module.get<CheckController>(CheckController);
});

it('should be defined', () => {
expect(controller).toBeDefined();
});
});
4 changes: 4 additions & 0 deletions backend/src/check/check.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Controller } from '@nestjs/common';

@Controller('check')
export class CheckController {}
9 changes: 9 additions & 0 deletions backend/src/check/check.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common';
import { CheckService } from './check.service';
import { CheckController } from './check.controller';

@Module({
providers: [CheckService],
controllers: [CheckController]
})
export class CheckModule {}
18 changes: 18 additions & 0 deletions backend/src/check/check.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { CheckService } from './check.service';

describe('CheckService', () => {
let service: CheckService;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [CheckService],
}).compile();

service = module.get<CheckService>(CheckService);
});

it('should be defined', () => {
expect(service).toBeDefined();
});
});
4 changes: 4 additions & 0 deletions backend/src/check/check.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';

@Injectable()
export class CheckService {}

0 comments on commit aad2ff7

Please sign in to comment.