-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INTERNAL] New dynamic import mock for NodeJS >= 20.6.xx (#663)
Fixes: SAP/ui5-tooling#891 Node's module loading has changed since 20.6.xx. As `esmock` is unable to properly mock dynamic imports within CommonJS modules, we need to use another alternative for this test. `testdouble` seems to work pretty well for that case, but for NodeJS versions below 20.6.xx it needs a `--loader` flag and we already use that for `esmock`. The solution would be to use the old mocking for older NodeJs versions and `testdouble` for the ones after 20.6.xx (no flag required here): https://github.com/testdouble/testdouble.js/blob/main/docs/7-replacing-dependencies.md#how-module-replacement-works-for-es-modules-using-import
- Loading branch information
Showing
3 changed files
with
85 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters