Open jongunter opened 7 years ago
This fails (apologies for the whitespace issues)
class MyService { doAThing(){ return 'bad'; } } //// bard.appModule('app'); bard.inject(this, 'MyService'); bard.mockService(MyService, { _default: false }); it('returns the proper values', ()=> { expect(MyService.doAThing()).toBe(false); })
Meanwhile, this succeeds:
function MyService() { var returnBad = function () { return 'bad'; }; this.doAThing = returnBad; } //// bard.appModule('app'); bard.inject(this, 'MyService'); bard.mockService(MyService, { _default: false }); it('returns the proper values', ()=> { expect(MyService.doAThing()).toBe(false); })
This fails (apologies for the whitespace issues)
Meanwhile, this succeeds: