jasmine-tapreporter

0.2.2 • Public • Published

jasmine-tapreporter

Jasmine reporter that reports a result in TAP format.

Usage

# a.coffee 
jasmine = require 'jasmine-node'
TAPReporter = require 'jasmine-tapreporter'
 
describe "usage of jasmine-tapreporter"->
  it "should be okay"->
    expect(true).toBeTruthy()
 
jasmine.getEnv().addReporter new TAPReporter console.log
jasmine.getEnv().execute()
$ coffee a.coffee
ok 1 - usage of jasmine-tapreporter should be okay.
1..1

DIRECTIVES

# b.coffee 
jasmine = require 'jasmine-node'
{TAPReportertodoskip} = require 'jasmine-tapreporter'
 
describe "sample of todo"->
  it "shold have a todo directive"->
    todo @"reason of todo"
    expect(true).toBeTruthy()
 
describe "sample of skip"->
  it "shold have a skip directive"->
    skip @"reason of skip"
    expect(true).toBeTruthy()
 
jasmine.getEnv().addReporter new TAPReporter console.log
jasmine.getEnv().execute()
$ coffee b.coffee
ok 1 - sample of todo shold have a todo directive. # TODO reason of todo
ok 2 - # SKIP reason of skip
1..2

Bail out!

# c.coffee 
jasmine = require 'jasmine-node'
{TAPReporterbailOut} = require 'jasmine-tapreporter'
 
describe "A first spec"->
  it "should have a test"->
    expect(true).toBeTruthy()
 
describe "A second spec"->
  it "should have a test"->
    bailOut "some reason"
    expect(true).toBeTruthy()
 
jasmine.getEnv().addReporter new TAPReporter console.log
jasmine.getEnv().execute()
$ coffee c.coffee
ok 1 - A first spec should have a test.
Bail out! some reason

Diagnostics

# d.coffee 
jasmine = require 'jasmine-node'
{TAPReporterdiag} = require 'jasmine-tapreporter'
 
describe "A spec"->
  it "should have a test"->
    diag "Diagnostic line"
    expect(true).toBeTruthy()
 
jasmine.getEnv().addReporter new TAPReporter console.log
jasmine.getEnv().execute()
$ coffee d.coffee
# Diagnostic line
ok 1 - A spec should have a test.
1..1

Install

npm install jasmine-tapreporter

Readme

Keywords

none

Package Sidebar

Install

npm i jasmine-tapreporter

Weekly Downloads

46

Version

0.2.2

License

none

Last publish

Collaborators

  • kozy4324