andreypopp/autobind-decorator

Break sinon.spy(Component.prototype, 'method')

Open

#47 建立於 2017年5月7日

在 GitHub 查看
 (8 留言) (1 反應) (0 負責人)JavaScript (1,446 star) (76 fork)batch import
PR welcomehelp wanted

描述

When using '@autobind' on a component, then in tests sinon.spy(Component.prototype, 'someMethod') will yield an error:

TypeError: Attempted to wrap undefined property undefined as function
...

Sorry, currently I can't provide more detail, but I'm sure @autobind is the only variable between success/error in tests.

貢獻者指南

Break sinon.spy(Component.prototype, 'method') · andreypopp/autobind-decorator#47 | Good First Issue