it seems that the test executions are getting exponentially slower when creating the mock-object after each test-case. I've provided a super simple reproducible environment, but I fear unfurtunately the results are really bad - last test takes over 30 secs(!):
After doing some profiling (this profiling snapshot is not from the stackblitz reproducible environment) it is clear that calling mock may take up, up 15sec just because of a function that is called ownKeys and not sure if this is a recursive call, but it is called uncountable times.
This is a severe issue that prevents me from using this library. In general I do really like this lib as enables to create partial mock object and still have type safety without ugly castings. So getting this fixed is really appreciated. Hope you can work with this initial data.
When creating mock objects with the
mock()
function and the mock object is of a somewhat reasonable size like here:it seems that the test executions are getting exponentially slower when creating the mock-object after each test-case. I've provided a super simple reproducible environment, but I fear unfurtunately the results are really bad - last test takes over 30 secs(!):
The environment which can be used to test this is: https://stackblitz.com/edit/node-lqkljc?file=index.test.ts
After doing some profiling (this profiling snapshot is not from the stackblitz reproducible environment) it is clear that calling mock may take up, up 15sec just because of a function that is called
ownKeys
and not sure if this is a recursive call, but it is called uncountable times.This is a severe issue that prevents me from using this library. In general I do really like this lib as enables to create partial mock object and still have type safety without ugly castings. So getting this fixed is really appreciated. Hope you can work with this initial data.