0

I'm having a problem where jasmine-node silently fails if unhandled exceptions happen in a test.

If I run a single file, everything is OK and I get the expected jasmine output:

./node_modules/jasmine-node/bin/jasmine-node spec/unit/accessControlSpec.js

Finished in 0.011 seconds
4 tests, 6 assertions, 0 failures, 0 skipped

But, if I run all specs in a folder, it fails silently.

./node_modules/jasmine-node/bin/jasmine-node spec/unit

Tried --verbose and --captureExceptions but no luck.

In this specific case, some code inside a test was calling a method that didn't exist.

shoegazerpt
  • 845
  • 8
  • 18

1 Answers1

1

So, turns out the problem is that I'm not calling the correct command because I didn't install jasmine-node globally.

The correct way is:

node ./node_modules/jasmine-node/lib/jasmine-node/cli.js ./spec/unit

This is further described here: Command Line Usage

shoegazerpt
  • 845
  • 8
  • 18