Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/app.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Test, TestingModule } from '@nestjs/testing';
import { AppService } from './app.service';

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

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

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

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

describe('getHello', () => {
it('returns the expected greeting', () => {
expect(service.getHello()).toBe('Hello World!');
});

it('returns the same greeting on repeated calls', () => {
expect(service.getHello()).toBe(service.getHello());
});
});
});
Loading