test: remove redundant JwtAuthGuard mock in unit test file
This commit is contained in:
parent
cd5ad2e1e4
commit
a56e774892
@ -3,19 +3,6 @@ import { Reflector } from '@nestjs/core';
|
|||||||
import { JwtAuthGuard } from './jwt-auth.guard';
|
import { JwtAuthGuard } from './jwt-auth.guard';
|
||||||
import { IS_PUBLIC_KEY } from '../decorators/public.decorator';
|
import { IS_PUBLIC_KEY } from '../decorators/public.decorator';
|
||||||
|
|
||||||
// Mock the AuthGuard
|
|
||||||
jest.mock('@nestjs/passport', () => {
|
|
||||||
return {
|
|
||||||
AuthGuard: jest.fn().mockImplementation(() => {
|
|
||||||
return class {
|
|
||||||
canActivate() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('JwtAuthGuard', () => {
|
describe('JwtAuthGuard', () => {
|
||||||
let guard: JwtAuthGuard;
|
let guard: JwtAuthGuard;
|
||||||
let reflector: Reflector;
|
let reflector: Reflector;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user