You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have only updated reactstrap from v9.1.5 to v9.1.9 and unit tests are failing.
What should be happening?
No failed unit tests.
Steps to reproduce issue
npm update reactstrap
npm run test ./...
Error message in console
TypeError: Cannot read property 'contains' of null
278 |
279 | fireEvent.change(contactChangeInput, { target: { value: 'valid-email@test.com' } });
> 280 | fireEvent.click(cancelButton);
| ^
at Dropdown.handleDocumentClick (node_modules/reactstrap/lib/Dropdown.js:86:35)
at Document.callTheUserObjectsOperation (node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30)
at innerInvokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:338:25)
at invokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:274:3)
at HTMLButtonElementImpl._dispatch (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:205:9)
at HTMLButtonElementImpl.dispatchEvent (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:94:17)
at HTMLButtonElement.dispatchEvent (node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:231:34)
at node_modules/@testing-library/dom/dist/events.js:19:20
at node_modules/@testing-library/react/dist/pure.js:79:16
at node_modules/@testing-library/react/dist/act-compat.js:64:24
at act (node_modules/react/cjs/react.development.js:2512:16)
at node_modules/@testing-library/react/dist/act-compat.js:63:25
at Object.eventWrapper (node_modules/@testing-library/react/dist/pure.js:78:28)
at fireEvent (node_modules/@testing-library/dom/dist/events.js:12:35)
at Function.fireEvent.<computed> [as click] (node_modules/@testing-library/dom/dist/events.js:110:36)
at Function.click (node_modules/@testing-library/react/dist/fire-event.js:18:52)
The text was updated successfully, but these errors were encountered:
seeing something similar to this coming from our production exception tracker. reported like so:
Message: Cannot read properties of null (reading 'contains')
at contains line 114, column 34 (../node_modules/reactstrap/esm/Dropdown.js:114)
var container = this.getContainer();
var menu = this.getMenu();
var toggle = this.getToggle();
var targetIsToggle = toggle.contains(e.target);
var clickIsInMenu = menu && menu.contains(e.target) && menu !== e.target;
var clickIsInInput = false;
if (container) {
Dropdown
#9.1.9
es
#18.0.26
#5.2.3
What is happening?
I have only updated reactstrap from v9.1.5 to v9.1.9 and unit tests are failing.
What should be happening?
No failed unit tests.
Steps to reproduce issue
Error message in console
The text was updated successfully, but these errors were encountered: