Open
Description
Subject of the issue
After migrating from createMock
to createHydratedMock
, I had a failing test.
I added some debuggers and I found out that nothing happened after using a cloneDeep.
Removing the cloneDeep
allow the test to pass as expected.
Using a spread operator is working as expected as well.
It means that there is something specific made inside the cloneDeep
that createHydratedMock
can't handle.
Your environment
- ts-auto-mock version: 3.2.2
- typescript version: 4.2.4
- node version: 14.16.0
- npm version: 7.12.1
- lodash: 4.17.21
Steps to reproduce
This is the object that should be copied (as JSON):
{
"response": "dummy-response",
"options": {
"tts": false,
"nonce": "",
"disableMentions": "none",
"files": [],
"code": "",
"split": false,
"content": "",
"embed": {},
"allowedMentions": {
"parse": [],
"roles": [],
"users": []
},
"reply": {}
}
}
Expected behavior
The test pass and the cloneDeep
works as expected when using createHydratedMock
.
Actual behavior
The test fail due to the cloneDeep
.