Giter VIP home page Giter VIP logo

jasmine-tapreporter's Introduction

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'
{TAPReporter, todo, skip} = 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'
{TAPReporter, bailOut} = 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'
{TAPReporter, diag} = 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

jasmine-tapreporter's People

Contributors

kozy4324 avatar e-iwazawa avatar

Stargazers

Eiji Iwazawa avatar

Watchers

Eiji Iwazawa avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.