Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sayan51
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
sayan51
5y ago
In my projects things are arranged in terms of class, and dependencies are injected to constructor using dependency injection. Then the requirements of mocking the dependencies during unit tests bolis down to mocking parts or whole of the i
2.
▲
by
sayan51
5y ago
Good question! I am not a user of Jest. So can't really comment on that. Taking a look at the docs from jest, it seems to me that my spy API is far more straightforward. Also it can be used by itself. Theoretically it can also be used
3.
▲
by
sayan51
5y ago
It can be used with test framework. Also it provides great type definition for the object being mocked, its method and arguments' types.
4.
▲
Netatwork/spy: Tiny proxy-based impl to mock and spy dependencies in unit tests
(github.com)
1 points
by
sayan51
5y ago
|
4 comments