0

I am using node:test as a substitute for mocha. package.json script is a simple "node --test" which looks in my 'test' directory and executes all files there. All files are executed, and I get activity printouts to the terminal when I do not attempt to pipe to a formatter (like tap-spec or tap-nyc). When I try running it with a formatter, node:test is only executing the first file (as listed in alphabetical order) and then quitting. For that first test though, it is changing the displayed results in accordance with selected formatter. My problem is it is not executing all files in the 'test' directory, only the first one it finds. The Node.js Test Runner documentation say, 'it should work with formatters'. Tested with W10 and W11, nodejs versions 19.5 and 18.6. Any suggestions?

Energetic Pixels
  • 349
  • 3
  • 15

0 Answers0