Skip to content

Commit

Permalink
fix: set up headers if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
tdeekens committed Jan 4, 2021
1 parent 07beec6 commit f415d88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/jest-preset-mc-app/setup-tests.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const fs = require('fs');
const { Headers } = require('node-fetch');
const path = require('path');
const colors = require('colors/safe');
const pkgDir = require('pkg-dir');
Expand All @@ -13,6 +14,7 @@ global.window.app = {
};

window.MutationObserver = MutationObserver;
global.Headers = global.Headers || Headers;

const shouldSilenceWarnings = (...messages) =>
jestConfig.silenceConsoleWarnings.some((msgRegex) =>
Expand Down

0 comments on commit f415d88

Please sign in to comment.