Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
install and use pnpm in the ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
MEZ901 committed Mar 25, 2024
1 parent 88a481d commit 0a97599
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ jobs:
with:
node-version: 20

- name: Install PNPM
run: npm install -g pnpm

- name: Install Dependencies
run: npm install
run: pnpm install

- name: Run Tests
run: npm test
run: pnpm test

- name: Build and Push Docker image
run: |
Expand Down
22 changes: 22 additions & 0 deletions src/app.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Test, TestingModule } from '@nestjs/testing';
import { AppController } from './app.controller';
import { AppService } from './app.service';

describe('AppController', () => {
let appController: AppController;

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

appController = app.get<AppController>(AppController);
});

describe('root', () => {
it('should return { message: "Hello World!"}', () => {
expect(appController.getHello()).toEqual('Hello World!');
});
});
});

0 comments on commit 0a97599

Please sign in to comment.