jsdom.js 458 B

1234567891011121314
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. 'use strict';
  8. // Make sure we're in a Browser-like environment before importing polyfills
  9. // This prevents `fetch()` from being imported in a Node test environment
  10. if (typeof window !== 'undefined') {
  11. // fetch() polyfill for making API calls.
  12. require('whatwg-fetch');
  13. }