Hey just double checking can we use whenObjectSet
whilst overloading the object set constructor?
I.e.
const MockObj Objects.create().ObjType('mock');
whenObjectSet(Objects.search().ObjType([MockObj])).thenReturn([MockObj])
I want to test my function that:
Takes objSet as input
calls .all() and applies filter
and returns a filtered object set
It currently gives me something like:
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'ObjTypeImpl'
| property 'osp' -> object with constructor ...
| property 'createdObjects' -> object with constructor 'Array'
--- index 0 closes the circle
at JSON.stringify (<anonymous>)