view data fixes
This commit is contained in:
@@ -3,7 +3,7 @@ import { RequireSystemAdmin, REQUIRE_SYSTEM_ADMIN_METADATA_KEY } from './Require
|
||||
|
||||
// Mock SetMetadata
|
||||
vi.mock('@nestjs/common', () => ({
|
||||
SetMetadata: vi.fn(() => () => {}),
|
||||
SetMetadata: vi.fn(() => (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => descriptor),
|
||||
}));
|
||||
|
||||
describe('RequireSystemAdmin', () => {
|
||||
@@ -30,7 +30,7 @@ describe('RequireSystemAdmin', () => {
|
||||
|
||||
const result = decorator(mockTarget, mockPropertyKey, mockDescriptor);
|
||||
|
||||
// The decorator should return the descriptor
|
||||
// The decorator should return the descriptor (SetMetadata returns the descriptor)
|
||||
expect(result).toBe(mockDescriptor);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user