andreypopp/autobind-decorator

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

Open

#47 geöffnet am 7. Mai 2017

Auf GitHub ansehen
 (8 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (1.446 Stars) (76 Forks)batch import
PR welcomehelp wanted

Beschreibung

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.

Contributor Guide