Skip to content

Minimal example for the current impossibility to mock standalone functions in the Node native test runner

Notifications You must be signed in to change notification settings

GabeAtWork/node-test-runner-cannot-mock-function-minimal-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node native test runner: cannot mock a function

Steps to reproduce:

  • Install volta (or set the node version in the way you wish)
  • Run npm install && npm run test
  • You will see:
    • The default export test passing
    • The single import test failing
    • The start import test failing

If related to the transpiling, I'm getting the same result with ts-node, so it does not seem to be related to @swc's transpilation.

About

Minimal example for the current impossibility to mock standalone functions in the Node native test runner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published