wip
This commit is contained in:
23
apps/api/src/application/hello/hello.service.spec.ts
Normal file
23
apps/api/src/application/hello/hello.service.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { HelloService } from './hello.service';
|
||||
|
||||
describe('HelloService', () => {
|
||||
let service: HelloService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [HelloService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<HelloService>(HelloService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
|
||||
it('should return "Hello World!"', () => {
|
||||
expect(service.getHello()).toBe('Hello World!');
|
||||
});
|
||||
});
|
||||
9
apps/api/src/application/hello/hello.service.ts
Normal file
9
apps/api/src/application/hello/hello.service.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class HelloService {
|
||||
getHello(): string {
|
||||
return 'Hello World!';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user