Skip to content

Commit 3500a2b

Browse files
authored
fix(unit-testing.md): Auto mocking is now appropriately typed.
NestJS 11's stricter linting threw a bunch of no-unsafe-* errors. This commit makes the linter happy. Fixes #3288
1 parent 89aa53c commit 3500a2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content/fundamentals/unit-testing.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ describe('CatsController', () => {
186186
const mockMetadata = moduleMocker.getMetadata(
187187
token,
188188
) as MockMetadata<any, any>;
189-
const Mock = moduleMocker.generateFromMetadata(mockMetadata);
189+
const Mock = moduleMocker.generateFromMetadata(
190+
mockMetadata,
191+
) as ObjectConstructor;
190192
return new Mock();
191193
}
192194
})

0 commit comments

Comments
 (0)