Closed jamespedid closed 5 years ago
I have a class with an injected property
class MyClass { @Inject private myProperty: MyDependency }
Inside of my mocha test I have the following:
Container.bind(MyClass).provider({ get: () => sinon.createStubInstance(MyDependency)});
const myInstance = new MyClass(); myInstance.myMethod(); // throws error because using unmocked version of MyDependency
How can I get this to work?
After further investigation I think the problem exists beyond the library.
I have a class with an injected property
Inside of my mocha test I have the following:
How can I get this to work?