Skip to content
Advertisement

How to show passed test in Jasmine?

When running jasmine it only presents dot(.) for successful tests, and only verbose if the test fails.

JavaScript

My running command is: jasmine-node test.spec.js

The result:

JavaScript

How to make jasmine display this test result like jasmine should show this text?

Advertisement

Answer

Use the --verbose flag:

JavaScript

Note: jasmine-node doesn’t seem to be actively maintained. The jasmine CLI supports tests run from the command line.

Although jasmine doesn’t have a verbose flag, you can use a custom terminal reporter (example: jasmine-terminal-reporter). From jasmine’s documentation, add a helper file to load the custom reporter and include the helper in your configuration file.

helpers/terminal-reporter.js

JavaScript

spec/support/jasmine.json

JavaScript
Advertisement