Skip to content

Commit

Permalink
test: bcrypt 모듈을 ES 모듈로 선언
Browse files Browse the repository at this point in the history
  • Loading branch information
minjungw00 committed Nov 14, 2024
1 parent 0496068 commit 0f071e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/src/auth/auth.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { JwtService } from "@nestjs/jwt";
import { getModelToken } from "@nestjs/mongoose";
import { Model } from "mongoose";
import { User, UserDocument } from "./schemas/user.schema";
import * as bcrypt from "bcrypt";

// Mock modules
jest.mock("bcrypt", () => ({
Expand All @@ -15,8 +16,6 @@ jest.mock("nanoid", () => ({
nanoid: () => "mockNanoId123",
}));

const bcrypt = require("bcrypt");

describe("AuthService", () => {
let service: AuthService;
let userModel: Model<UserDocument>;

Check warning on line 21 in server/src/auth/auth.service.spec.ts

View workflow job for this annotation

GitHub Actions / Lint and Unit Test

'userModel' is assigned a value but never used. Allowed unused vars must match /^(js|Injectable|Controller|Get|Post|Put|Delete|Patch|Options|Head|All)$/u

Check warning on line 21 in server/src/auth/auth.service.spec.ts

View workflow job for this annotation

GitHub Actions / Lint and Unit Test

'userModel' is assigned a value but never used. Allowed unused vars must match /^(js|Injectable|Controller|Get|Post|Put|Delete|Patch|Options|Head|All)$/u
Expand Down

0 comments on commit 0f071e9

Please sign in to comment.