I have a loopback model Student, and a loopback model Teacher.
They have a hasAndBelongsToMany relation
I want to stub studentObj.teachers() in one of my tests (preferably with sinon.js)
When I try to stub it I get the following error:
Attempted to wrap undefined property teachers as function (probably because it's a getter)
I tried to stub the getter but that didn't work either
I tried to override the function but that gave me a read-only error
Is there an easy way to stub out relation methods on a Loopback modelConstructor?