Skip to content

A demo repo for illustraing how heft won't run ESM tests

Notifications You must be signed in to change notification settings

ChristophP/heft-jest-esm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heft won't run ESM jest test

This rush monorepo contains a single package called lib.

It has type: "module" set in the package.json (meaning it interprets .js files as ESM).

Reproducing the issue

Install dependencies

rush update

Running the build

cd packages/lib
rushx build

Running with jest alone

rushx jest-only        # tests run with ESM

Running with Heft

rushx heft-breaks      # breaks because heft somehow ignores NODE_OPTIONS=--experimental-vm-modules 

Conclusion

Heft somehow ignores somehow ignores NODE_OPTIONS=--experimental-vm-modules, which Jest needs in order to run ESM.

About

A demo repo for illustraing how heft won't run ESM tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published