Giter Club home page Giter Club logo

suman-reporters's Introduction

Official Suman reporters

This repo contains reporters for both Node.js and the browser. Suman supports asynchronous reporters, so that reporters can persist data using async I/O, etc, if they wish.


If you are using a language other than JS with the Suman runner:
what you do is write TAP or TAP-JSON to stdout in the language of your choice, and the Suman runner will capture the stdout from your child process, and then use one of these reporters to report the output in a more human friendly format in the parent process (the Suman runner is the parent process).

Installing

$ npm install suman-reporters

Loading reporters

Suman reporters in this package can be imported like so:

// typescript
import r = require('suman-reporters/modules/tap-reporter');
// js
const r = require('suman-reporters/modules/tap-reporter');

To use a reporter with the suman command line, the API is like so:

$ suman --reporter="tap-reporter"

You can load multiple reporters like so:

$ suman --reporter="tap-reporter" --reporter="std-reporter"

The loading logic is as follows:

  1. First suman will attempt to require('tap-reporter')
  2. If the above fails, then it will attempt to require('suman-reporters/modules/tap-reporter')

So for "max efficiency", you could just use this:

$ suman --reporter="suman-reporters/modules/tap-reporter"

Anatomy of a Suman-compliant reporter:

Export a function, either with module.exports or exports.default.

This function takes 4 arguments:

exports.default = function(s, o, expct, c){
  
   // s is an event emitter instance
   // o is a copy of the suman command line options as a plain object
   // expct is a plain object representing the expected pass/fail/skipped/stubbed counts
   // c is a socket.io client

}

Take a look at the modules directory for up-to-date samples; TypeScript will aid in getting the types right.

suman-reporters's People

Contributors

oresoftware avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

suman-reporters's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

ansi-styles issue - missing module

Error: Cannot find module 'color-convert'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/oleg/WebstormProjects/oresoftware/sumanjs/suman-reporters/node_modules/ansi-styles/index.js:2:22)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3) 

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.