Socket
Book a DemoInstallSign in
Socket

jasmine-terminal-reporter

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-terminal-reporter

A simple terminal reporter for Jasmine

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

jasmine-terminal-reporter

A simple terminal reporter for Jasmine, inspired by juliemr/minijasminenode.

Build Status Dependency Status

installation

Get the library with

npm install jasmine-terminal-reporter

usage

Depends on your jasmine spec runner, but to import and instantiate the reporter:

    var Reporter = require('jasmine-terminal-reporter');
    var reporter = new Reporter(options)

output

By default, the output will be fairly compact. Each test is represented by a green dot (passed), a red F (failed) or a yellow * (pending). Every failed test and expectation will be detailed, and a summary will be printed at the end:

.....................F..*..*....*.....

Failures:
1) A suite with a test will fail
1.1) Expected true to be false.

38 specs, 1 failures, 3 pending
Finished in 0.5 seconds

If verbose mode is selected, each suite and spec is detailed:

Running 38 specs.

A suite
  nested in another
      has a test that passes: passed
      has a test that fails: failed

[...]

Failures:
1) A suite nested in another has a test that fails
1.1) Expected true to be false.

38 specs, 1 failure
Finished in 0.5 seconds

options

  • isVerbose: see above.

  • includeStackTrace: (Default: false) Displays the stack trace on failed tests

  • showColors: (Default: true)

  • done: Optional method to call when jasmine is done. First argument is true if all tests have passed or are pending.

  • stackFilter: Optional method called to format the stack trace. Receives a string as the first parameter and returns the formatted stack trace.

  • print: Optionnal method used to display the output. By default, will write to process.stdout.

FAQs

Package last updated on 15 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts