Skip to content

Commit

Permalink
typo: lint 규칙에 맞춰서 코드 수정
Browse files Browse the repository at this point in the history
- 기존에 as any로 명시되어 있던 타입을 각 쓰임새에 맞춰 as unknown as Request, Response로 변경
  • Loading branch information
i3kae committed Nov 13, 2024
1 parent 67a8c0e commit 0266b46
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions backend/mainServer/src/host/host.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { HostController } from './host.controller';
import { HostService } from './host.service';
import { HttpStatus } from '@nestjs/common';
import {describe, expect, jest} from '@jest/globals';
import {Request, Response} from 'express';

describe('HostController', () => {
let controller: HostController;
Expand Down Expand Up @@ -37,12 +38,12 @@ describe('HostController', () => {
body: {
uuid: mockUuid,
},
} as any;
} as unknown as Request;

const res = {
status: jest.fn().mockReturnThis(),
json: jest.fn(),
} as any;
} as unknown as Response;

await controller.generateStreamKey(req, res);

Expand All @@ -61,12 +62,12 @@ describe('HostController', () => {
body: {
// uuid가 없는 비정상적인 요청
},
} as any;
} as unknown as Request;

const res = {
status: jest.fn().mockReturnThis(),
json: jest.fn(),
} as any;
} as unknown as Response;

await controller.generateStreamKey(req, res);

Expand All @@ -84,12 +85,12 @@ describe('HostController', () => {
body: {
uuid: 'test-uuid',
},
} as any;
} as unknown as Request;

const res = {
status: jest.fn().mockReturnThis(),
json: jest.fn(),
} as any;
} as unknown as Response;

await controller.generateStreamKey(req, res);

Expand Down

0 comments on commit 0266b46

Please sign in to comment.