-
Notifications
You must be signed in to change notification settings - Fork 0
Doc: Runtime patching on Node.js #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
OK, found a solution
|
This is a great catch, @d9k! As you mentioned, node-fetch recommends its users to patch the That being said, this should be made specifically clear in the MockRequests docs so that other users aren't left scratching their heads over why it's not working as expected. I'll leave this issue open until I push the update. |
# Enhance XMLHttpRequest docs and implementation This PR fixes issues [#14](#14), [#15](#15), and [#16](#16). Primary changes: * Add handlers for both `onload` and `onloadend` events in addition to `readystatechange` in order to support `axios@>=0.22.2`. * Support both `on[event]` and `addEventListener(event)` methods for `XMLHttpRequest`. * Add shim for usage in back-end/NodeJS scripts using `axios` with `XMLHttpRequest` polyfills. * Add extensive documentation in the ReadMe for how to use MockRequests in the back-end/NodeJS scripts. Secondary changes: * Update both MockRequests and its demo to use `node@>=14` for better dependency resolution. - Requires replacing `node-sass` with `sass` and fixing the incorrect re-defining of `vendor` in both `entry` and `optimization` within webpack.config.js. * Make homepage redirect to JSDoc website. * Ensure Jest DOM is defined by changing setup files from `setupFiles` to `setupFilesAfterEnv`. * Fix ReadMe links to work on npmjs.com (they already worked perfectly on GitHub, but npmjs.com is too primitive to understand renamed hyperlinks via `<a name="X"/>`). * Simplify wrapper overriding logic. * Add tests for all sorts of `addEventListener()` usages.
This should be fixed in PR #17. Please let me know if you still encounter any issues! |
Does this library supports runtime patching (without the use of webpack at all)?
inside
node
interpreter:The text was updated successfully, but these errors were encountered: