Skip to content
This repository has been archived by the owner on Jun 18, 2018. It is now read-only.

Test pollution while using TestBackend #3

Open
comatose-turtle opened this issue Nov 13, 2017 · 0 comments
Open

Test pollution while using TestBackend #3

comatose-turtle opened this issue Nov 13, 2017 · 0 comments

Comments

@comatose-turtle
Copy link

We're using the test backend and simulating dragging and dropping with the provided functions, simulateBeginDrag, simulateDrop, simulateDragEnd, etc. It becomes immediately apparent, however, that the same object is in effect across multiple tests, due to errors like cannot call beginDrag while dragging popping up only once a preceding test fails in the middle. Here's the code we're using to get the backend from our Component:

import { mount } from 'enzyme';
wrapper = mount(<MyComponent />)
backend = wrapper.instance().getManager().getBackend();

Are we using this wrong, is there a bad interaction with Enzyme, or is there legitimate test pollution going on here with static variables?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant