Skip to content

Instantly share code, notes, and snippets.

@zerodevx
Last active February 7, 2020 07:05
Show Gist options
  • Save zerodevx/dd13ec395e3de9be01f1b3a0cbde039b to your computer and use it in GitHub Desktop.
Save zerodevx/dd13ec395e3de9be01f1b3a0cbde039b to your computer and use it in GitHub Desktop.
JSDOM gotchas (ref: `jsdom v16.1.0`)
  1. fetch() is unsupported.

  2. XMLHttpRequest does not pass through JSOM.ResourceLoader. (jsdom/jsdom#1393)

  3. Does not respect synchronous execution of <script> tags. For eg.

<script src="run-first.js"></script>
<script src="run-second.js"></script>
<!-- You will expect `run-first.js` to be downloaded **and** run, 
     before `run-second.js` is. AFAICT `jsdom` runs both asynchronously. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment