Releases: iambumblehead/esmock
add support for mocking `await import( name )`
- add support for mocking
await import( name )
- add test and update README
add latest-windows support and tests
add latest-windows support and tests
v1.0.1 make warning message go away
node v16.12+ would emit a warning when the loader exported "getSource". making getSource null for those environments makes the error go away.
super version 1.0
esmock is used in many projects with a great number and variety of tests. This is the 1.0 release.
export load hook
export the 'load' hook, required by node 16.12 and greater,
https://nodejs.org/api/esm.html#loadurl-context-defaultload
Note: In a previous version of this API, this was split across 3 separate, now deprecated, hooks (getFormat, getSource, and transformSource).
version bump, increment devDependencies
version bump, increment devDependencies
v0.4.0
Do not runtime error when returning [object Module] defaults. This relates to read-only, spread-imported definitions.
For example, mocking the following script previously resulted in an error (not anymore),
import * as fsmod from 'fs';
export default fsmod;
add node 16.x image for tests
- add node 16.x image for tests
- add --no-warnings modifier to README example
- add unit-test
small change to README
- small change to README
added test, throw error when mock path not found
- added test, throw error when mock path not found