Replies: 1 comment 3 replies
-
Hey @cneumann! First, I would like to see you layer code, or at least a minimal example. In the meantime, maybe you are interested in simply pass that error using something like: const spy = makeSpy(EditableLayer.prototype, '_addEventHandlers');
spy.returns('whatever'); You have some layer tests examples here. Hope it helps! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm trying to write a test for a CompositeLayer that makes use of nebula.gl's
EditableGeoJsonLayer
, but it hits an error (Cannot read property 'eventManager' of undefined). InEditableLayer._addEventHandlers
this.context.deck
is accessed, but does not exist on the layer instance. Unfortunately nebula.gl does not seem to have tests for the layer as far as I've seen, so I couldn't just borrow from there 😉Is there a way to get a Deck instance created when using
testLayer{,Async}
? Or any other ideas how I can test my layer - I'm mostly interested in doing lifecycle testing. Thanks!Beta Was this translation helpful? Give feedback.
All reactions