Skip to content

Commit

Permalink
chore(tests): fix tests for node 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerard Brull committed May 13, 2020
1 parent b9caeb2 commit c8d4995
Show file tree
Hide file tree
Showing 2 changed files with 276 additions and 160 deletions.
8 changes: 8 additions & 0 deletions src/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import 'jest-styled-components';
import '@testing-library/jest-dom/extend-expect';
import 'jest-axe/extend-expect';

// polyfill globalThis for older nodes
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
globalThis = global;
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { JSDOM } = require('jsdom');
new JSDOM('', { runScripts: 'dangerously' });

0 comments on commit c8d4995

Please sign in to comment.