Open davidgtu opened 2 months ago
Hi there,
I was able to use this plugin to successfully generate mocked data, however whenever I try to use it in a test (or normally call it at all), I get an error:
RangeError: Maximum call stack size exceeded ❯ aMember src/generated/generated-mocks.ts:7690:3 7688| 7689| export const aMember = (overrides?: Partial<Member>): Member => { 7690| return { | ^ 7691| data: 7692| overrides && overrides.hasOwnProperty('data......
I'm using vitest as a test runner, and when I simply do something like console.log(aMember({ firstName: 'test' }));, I still get this error.
vitest
console.log(aMember({ firstName: 'test' }));
Am I using this in the wrong way? I've tried using it in a test and I still get the same error.
Any help would be great. Thank you.
This can happen if you have a Type with properties or sub-properties referencing the same type
You can use the option terminateCircularRelationships
Hi there,
I was able to use this plugin to successfully generate mocked data, however whenever I try to use it in a test (or normally call it at all), I get an error:
I'm using
vitest
as a test runner, and when I simply do something likeconsole.log(aMember({ firstName: 'test' }));
, I still get this error.Am I using this in the wrong way? I've tried using it in a test and I still get the same error.
Any help would be great. Thank you.