Skip to content

Releases: iambumblehead/esmock

add support for mocking `await import( name )`

26 Nov 21:08
b1cfd87
Compare
Choose a tag to compare
  • add support for mocking await import( name )
  • add test and update README

add latest-windows support and tests

26 Nov 06:44
88bb715
Compare
Choose a tag to compare

add latest-windows support and tests

v1.0.1 make warning message go away

06 Nov 02:43
246cafd
Compare
Choose a tag to compare

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

28 Oct 04:36
Compare
Choose a tag to compare

esmock is used in many projects with a great number and variety of tests. This is the 1.0 release.

export load hook

28 Oct 04:22
Compare
Choose a tag to compare

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

20 Oct 16:25
Compare
Choose a tag to compare

version bump, increment devDependencies

v0.4.0

08 Sep 01:02
54872b0
Compare
Choose a tag to compare

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

08 May 07:29
e3b3dbd
Compare
Choose a tag to compare
  • add node 16.x image for tests
  • add --no-warnings modifier to README example
  • add unit-test

small change to README

21 Apr 08:29
a320ff6
Compare
Choose a tag to compare
  • small change to README

added test, throw error when mock path not found

21 Apr 05:54
d859066
Compare
Choose a tag to compare
  • added test, throw error when mock path not found