First off, thanks for making and maintaining this project. We've enjoyed using these factories for improving our test data.
This isn't a bug per-say, but I had a question about something I've noticed while using factory.ts. Specifically, it seems that, when adding nested objects to factories, there is some sort of merging of data that happens with the default provided.
The problem is, this doesn't actually override what is stored in the default factory, and instead it does some kind of merging to leave me with this result:
In other words, my custom overridden has been merged into one with the default data.
My question is: what is the motivation behind this and is there anyway to opt out of this? What would be the recommended approach if I wanted to be able to actually override something? I'd hate to make an entirely new factory just for this one case.
Hello!
First off, thanks for making and maintaining this project. We've enjoyed using these factories for improving our test data.
This isn't a bug per-say, but I had a question about something I've noticed while using factory.ts. Specifically, it seems that, when adding nested objects to factories, there is some sort of merging of data that happens with the default provided.
i.e. consider this example:
Now, let's say I want to OVERRIDE entirely what is stored in
extras
, with the following example:The problem is, this doesn't actually override what is stored in the default factory, and instead it does some kind of merging to leave me with this result:
In other words, my custom overridden has been merged into one with the default data.
My question is: what is the motivation behind this and is there anyway to opt out of this? What would be the recommended approach if I wanted to be able to actually override something? I'd hate to make an entirely new factory just for this one case.