You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking through the documentation many times now and it doesn't seem to say anywhere how to reference another type object, just type lists of objects
ProductTeam: ()=>({id: casual.integer(0,200),product_name: casual.title,product_description: casual._short_description,owner: User// <- how do I reference the user object?}),// My user object that I want to reference aboveUser: ()=>({id: casual.integer(0,200),first_name: casual.first_name,last_name: casual.last_name,email: casual.email,username: casual.username,}),
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've been looking through the documentation many times now and it doesn't seem to say anywhere how to reference another type object, just type lists of objects
so this is my scheme:
and this is my mockdata:
So how do I reference the user object in my mock?
I've tried
() => User
() => User()
User()
but seems to be all wrong :(
Beta Was this translation helpful? Give feedback.
All reactions