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'm using testing-library with jest to test react application. After I switched to jsdom-environment-jsdom-sixteen which uses jsdom 16.4.0 I started to get following errors and whole test run output is now flooded with these errors and making spotting actual errors very hard:
Error: Not implemented: window.computedStyle(elt, pseudoElt)
at module.exports (/home/kertzi/repos/DaisyFamily/.yarn/$$virtual/jsdom-virtual-89425ac844/0/cache/jsdom-npm-16.4.0-2745a1cb43-adca681df0.zip/node_modules/jsdom/lib/jsdom/browser/not-implemented.js:9:17)
at Window.getComputedStyle (/home/kertzi/repos/DaisyFamily/.yarn/$$virtual/jsdom-virtual-89425ac844/0/cache/jsdom-npm-16.4.0-2745a1cb43-adca681df0.zip/node_modules/jsdom/lib/jsdom/browser/Window.js:657:7)
at computeMiscTextAlternative (/home/kertzi/repos/DaisyFamily/.yarn/cache/dom-accessibility-api-npm-0.4.5-c0ff527c7b-c4058ec055.zip/node_modules/dom-accessibility-api/sources/accessible-name.ts:347:24)
at computeTextAlternative (/home/kertzi/repos/DaisyFamily/.yarn/cache/dom-accessibility-api-npm-0.4.5-c0ff527c7b-c4058ec055.zip/node_modules/dom-accessibility-api/sources/accessible-name.ts:576:11)
at computeAccessibleName (/home/kertzi/repos/DaisyFamily/.yarn/cache/dom-accessibility-api-npm-0.4.5-c0ff527c7b-c4058ec055.zip/node_modules/dom-accessibility-api/sources/accessible-name.ts:607:3)
at Array.from.filter.filter.filter.filter.element (/home/kertzi/repos/DaisyFamily/.yarn/cache/@testing-library-dom-npm-7.20.0-a2eae9dc6b-1e6ceb7177.zip/node_modules/@testing-library/dom/dist/queries/role.js:96:82)
at Array.filter (<anonymous>)
at queryAllByRole (/home/kertzi/repos/DaisyFamily/.yarn/cache/@testing-library-dom-npm-7.20.0-a2eae9dc6b-1e6ceb7177.zip/node_modules/@testing-library/dom/dist/queries/role.js:90:6)
at args (/home/kertzi/repos/DaisyFamily/.yarn/cache/@testing-library-dom-npm-7.20.0-a2eae9dc6b-1e6ceb7177.zip/node_modules/@testing-library/dom/dist/query-helpers.js:89:17)
at args (/home/kertzi/repos/DaisyFamily/.yarn/cache/@testing-library-dom-npm-7.20.0-a2eae9dc6b-1e6ceb7177.zip/node_modules/@testing-library/dom/dist/query-helpers.js:64:17) undefined
Errors doesn't disappear when i try to set computedStyleSupportsPseudoElements: false with configure function.
This is related to change in jsdom 16.4.0: jsdom/jsdom#2918
There also discussion on jsdom repo about this and if I understood jsdom developers correctly this should be fixed on caller side. jsdom/jsdom#3025
import { configure } from '@testing-library/react';
import Adapter from 'enzyme-adapter-react-16';
enzymeConfigure({ adapter: new Adapter() });
configure({
computedStyleSupportsPseudoElements: false
})
Suggested solution from jsdom developers seems to not call computedStyle with pseudoElt parameters.
Maybe there is some bug in configure function because setting computedStyleSupportsPseudoElements to false doesn't fix the problem. Docs says that it should.
I don't have enough skills and time to create fix myself even don't know how to.
Thanks
The text was updated successfully, but these errors were encountered:
I'm using testing-library with jest to test react application. After I switched to jsdom-environment-jsdom-sixteen which uses jsdom 16.4.0 I started to get following errors and whole test run output is now flooded with these errors and making spotting actual errors very hard:
Errors doesn't disappear when i try to set
computedStyleSupportsPseudoElements: false
with configure function.This is related to change in jsdom 16.4.0: jsdom/jsdom#2918
There also discussion on jsdom repo about this and if I understood jsdom developers correctly this should be fixed on caller side.
jsdom/jsdom#3025
testing-library/react: 10.4.5
testing-library/dom: 7.20.0
jest: 24.9.0
react: 16.13.1
Configuration:
Suggested solution from jsdom developers seems to not call computedStyle with pseudoElt parameters.
Maybe there is some bug in configure function because setting computedStyleSupportsPseudoElements to false doesn't fix the problem. Docs says that it should.
I don't have enough skills and time to create fix myself even don't know how to.
Thanks
The text was updated successfully, but these errors were encountered: