'Test function type with Jest in Typescript
I would like to test an object with contains different functions with Jest. However, I don't want just to verify that properties are functions, but, that they have the right type too. Is it possible with Jest? Currently, I test:
expect(obj).toEqual(
expect.objectContaining({
objFunc: expect.any(Function),
}),
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
