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
airbnb-browser-shims version: ^2.1.0
Jest Version: ^21.2.1
This seems to be an issue with browser shims' compatibility with jsdom. A simple reconstruction of this issue would be to create a test file:
/* testfile.test.jsx */
/**
* @jest-environment jsdom
*/
import 'airbnb-browser-shims';
describe('any test', () => {
it('should do something', () => {
console.log('it will fail before tests are run');
});
});
This throws an error:
● Test suite failed to run
TypeError: Cannot read property 'parentNode' of undefined
at node_modules/matchmedia-polyfill/matchMedia.js:18:15
at Object.<anonymous> (node_modules/matchmedia-polyfill/matchMedia.js:46:2)
at Object.<anonymous> (node_modules/airbnb-browser-shims/browser-only.js:27:3)
at Object.<anonymous> (node_modules/airbnb-browser-shims/index.js:7:1)
at Object.<anonymous> (tests/DirectionProvider_test.jsx:14:1)
at next (native)
at next (native)
The text was updated successfully, but these errors were encountered:
airbnb-browser-shims version: ^2.1.0
Jest Version: ^21.2.1
This seems to be an issue with browser shims' compatibility with
jsdom
. A simple reconstruction of this issue would be to create a test file:This throws an error:
The text was updated successfully, but these errors were encountered: