Giter Site home page Giter Site logo

tunnckocore / dush-tap-report Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 493 KB

A simple TAP report producer based on event system. A plugin for `dush` event emitter or anything based on it

License: MIT License

JavaScript 100.00%
tap tape test-anything-protocol producer report reporter emitter event-system events minibaseplugin

dush-tap-report's Introduction

dush-tap-report NPM version mit license NPM monthly downloads npm total downloads

A simple TAP report producer based on event system. A plugin for dush event emitter or anything based on it

code climate code style linux build windows build code coverage dependency status paypal donate

You might also be interested in dush - an event emitter system, extensible through plugins. Or minibase, a tiny framework based on dush for building robust and complex applications.

Table of Contents

(TOC generated by verb using markdown-toc)

Install

Install with npm

$ npm install dush-tap-report --save

or install using yarn

$ yarn add dush-tap-report

Usage

For more use-cases see the tests

const dushTapReport = require('dush-tap-report')

API

A simple TAP report producing plugin for dush or anything based on it. It returns a function that can be passed to dush's .use method. This plugin will also work for minibase and base mini frameworks for building robust apps.

Params

  • options {Object}: optional options, merged with app.options, passed to stacktrace-metadata and find-callsite
  • options.writeLine {Function}: a logger function called on each line, default console.log
  • options.cleanStack {Boolean}: if false won't clean stack trace from node internals, clean-stacktrace
  • options.shortStack {Boolean}: if false full stack traces, otherwise they are just four
  • options.showStack {Boolean}: if false the error.stack will be empty string
  • options.relativePaths {Boolean}: if false paths in stack traces will be absolute, clean-stacktrace-relative-paths
  • options.mapper {Function}: called on each line of the stack with (line, index) signature
  • options.cwd {String}: current working directory, default process.cwd()
  • returns {Function}: a plugin function that should be passed to .use method of minibase, base or dush

Example

const reporter = require('dush-tap-report')
const dush = require('dush')

const app = dush()

// provide a fake stats object
// so `finish` to work correctly
app.use(reporter({
  stats: {
    count: 3,
    pass: 2,
    fail: 1
  }
}))

const item = {
  index: 1,
  title: 'some passing test'
}
const failing = {
  index: 2,
  title: 'failing test, sorry',
  reason: new Error('some sad error here')
}
const item2 = {
  index: 3,
  title: 'awesome test is okey'
}

app.emit('start', app)
// => 'TAP version 13'

app.emit('pass', app, item)
// =>
// # :) some passing test
// ok 1 - some passing test

app.emit('fail', app, failing)
// =>
// # :( failing test, sorry
// not ok 2 - failing test, sorry

app.emit('pass', app, item2)
// =>
// # :) awesome test is okey
// ok 3 - awesome test is okey

app.emit('finish', app)
// =>
// 1..3
// # tests 3
// # pass  2
// # fail  1

Related

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guidelines for advice on opening issues, pull requests, and coding standards.
If you need some help and can spent some cash, feel free to contact me at CodeMentor.io too.

In short: If you want to contribute to that project, please follow these things

  1. Please DO NOT edit README.md, CHANGELOG.md and .verb.md files. See "Building docs" section.
  2. Ensure anything is okey by installing the dependencies and run the tests. See "Running tests" section.
  3. Always use npm run commit to commit changes instead of git commit, because it is interactive and user-friendly. It uses commitizen behind the scenes, which follows Conventional Changelog idealogy.
  4. Do NOT bump the version in package.json. For that we use npm run release, which is standard-version and follows Conventional Changelog idealogy.

Thanks a lot! :)

Building docs

Documentation and that readme is generated using verb-generate-readme, which is a verb generator, so you need to install both of them and then run verb command like that

$ npm install verbose/verb#dev verb-generate-readme --global && verb

Please don't edit the README directly. Any changes to the readme must be made in .verb.md.

Running tests

Clone repository and run the following in that cloned directory

$ npm install && npm test

Author

Charlike Mike Reagent

License

Copyright © 2017, Charlike Mike Reagent. Released under the MIT License.


This file was generated by verb-generate-readme, v0.4.3, on March 19, 2017.
Project scaffolded using charlike cli.

dush-tap-report's People

Contributors

greenkeeper[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

dush-tap-report's Issues

An in-range update of nyc is breaking the build 🚨

Version 10.2.0 of nyc just got published.

Branch Build failing 🚨
Dependency nyc
Current Version 10.1.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As nyc is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/appveyor/branch Waiting for AppVeyor build to complete Details

  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 6 commits .

  • 455619f chore(release): 10.2.0
  • 95cc09a feat: upgrade to version of yargs with extend support (#541)
  • 43535f9 chore: explicit update of istanbuljs dependencies (#535)
  • 98ebdff feat: allow babel cache to be enabled (#517)
  • 50adde4 feat: exclude the coverage/ folder by default 🚀 (#502)
  • 6a59834 chore(package): update tap to version 10.0.0 (#507)

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of dush is breaking the build 🚨

Version 3.0.1 of dush just got published.

Branch Build failing 🚨
Dependency dush
Current Version 3.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As dush is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • ci/circleci CircleCI is running your tests Details

  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • continuous-integration/appveyor/branch Waiting for AppVeyor build to complete Details

  • bitHound - Dependencies 3 failing dependencies. Details

  • bitHound - Code No failing files. Details

Commits

The new version differs by 7 commits .

  • 62750cd chore(release): 3.0.1
  • 5b1fa43 fix(readme): add list of plugins
  • af1bc04 fix(readme): include ToC
  • 671d2eb docs(readme): tweaks
  • e9321a2 fix(readme): update boilerplate
  • 17bd948 fix(ci): move to CircleCI, instead of TravisCI
  • 7d6c4e2 fix(index): make detection "sourceString" more private

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

Version 11.0.2 of nyc just got published.

Branch Build failing 🚨
Dependency nyc
Current Version 11.0.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As nyc is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/appveyor/branch Waiting for AppVeyor build to complete Details
  • bitHound - Code No failing files. Details
  • bitHound - Dependencies 3 failing dependencies. Details
  • ci/circleci Your tests passed on CircleCI! Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 2 commits.

  • e4eff12 chore(release): 11.0.2
  • 0c2ef43 chore: upgrade to newer version of spawn-wrap (#592)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

Version 10.3.2 of nyc just got published.

Branch Build failing 🚨
Dependency nyc
Current Version 10.3.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As nyc is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/appveyor/branch Waiting for AppVeyor build to complete Details,- ✅ bitHound - Code No failing files. Details,- ❌ bitHound - Dependencies 3 failing dependencies. Details,- ✅ ci/circleci Your tests passed on CircleCI! Details,- ❌ continuous-integration/travis-ci/push The Travis CI build is in progress Details

Commits

The new version differs by 2 commits0.

  • e062a86 chore(release): 10.3.2
  • 213206f fix: we should not create a cache folder if cache is false (#567)

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of dush is breaking the build 🚨

Version 3.0.3 of dush just got published.

Branch Build failing 🚨
Dependency dush
Current Version 3.0.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As dush is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • ci/circleci CircleCI is running your tests Details

  • continuous-integration/travis-ci/push The Travis CI build is in progress Details

  • continuous-integration/appveyor/branch Waiting for AppVeyor build to complete Details

  • bitHound - Code No failing files. Details

  • bitHound - Dependencies 3 failing dependencies. Details

Commits

The new version differs by 2 commits .

  • 81d4018 chore(release): 3.0.3
  • c6972dd fix(readme): update plugins list and github tag badge link

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

Version 10.3.0 of nyc just got published.

Branch Build failing 🚨
Dependency nyc
Current Version 10.2.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As nyc is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details - ❌ **continuous-integration/travis-ci/push** The Travis CI build is in progress [Details](https://travis-ci.org/tunnckoCore/dush-tap-report/builds/227092328?utm_source=github_status&utm_medium=notification),- ❌ **continuous-integration/appveyor/branch** Waiting for AppVeyor build to complete [Details](https://ci.appveyor.com/project/tunnckoCore/dush-tap-report/build/1.0.31),- ❌ **bitHound - Dependencies** 3 failing dependencies. [Details](https://www.bithound.io/github/tunnckoCore/dush-tap-report/7c8d1137b8a4ad834ccad0769ecbcd55748efc39/dependencies/npm#filter-failing-dep),- ✅ **bitHound - Code** No failing files. [Details](https://www.bithound.io/github/tunnckoCore/dush-tap-report/7c8d1137b8a4ad834ccad0769ecbcd55748efc39/files?status=passing),- ✅ **ci/circleci** Your tests passed on CircleCI! [Details](https://circleci.com/gh/tunnckoCore/dush-tap-report/12?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

Commits

The new version differs by 4 commits ahead by 4, behind by 2.

  • 55e826d chore(release): 10.3.0
  • 89dc7a6 chore: explicit update of istanbul dependnecies (#562)
  • 1887d1c feat: add support for --no-clean, to disable deleting raw coverage output (#558)
  • ff73b18 fix: source-maps were not being cached in the parent process when --all was being used (#556)

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of dush is breaking the build 🚨

Version 3.0.5 of dush just got published.

Branch Build failing 🚨
Dependency dush
Current Version 3.0.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As dush is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • ci/circleci CircleCI is running your tests Details
  • continuous-integration/appveyor/branch Waiting for AppVeyor build to complete Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details
  • bitHound - Code No failing files. Details
  • bitHound - Dependencies 4 failing dependencies. Details

Commits

The new version differs by 8 commits.

  • 7c403dd chore(release): 3.0.5
  • c7162ce fix(update): add eslintrc and format the codebase
  • f3f75a8 chore(package): update standard to version 10.0.1
  • 39140c7 Update rollup-plugin-uglify to version 2.0.1 🚀 (#16)
  • eae6639 Merge branch 'master' into greenkeeper-rollup-plugin-uglify-2.0.1
  • ba113a8 Merge pull request #14 from tunnckoCore/greenkeeper-standard-10.0.2
  • 4d8869c chore(package): update rollup-plugin-uglify to version 2.0.1
  • 74f9cac chore(package): update standard to version 10.0.2

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of standard-version is breaking the build 🚨

Version 4.2.0 of standard-version just got published.

Branch Build failing 🚨
Dependency standard-version
Current Version 4.1.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As standard-version is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • bitHound - Code No failing files. Details
  • bitHound - Dependencies 4 failing dependencies. Details
  • ci/circleci Your tests passed on CircleCI! Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Commits

The new version differs by 2 commits.

  • 2790e08 chore(release): 4.2.0
  • bc0fc53 feat: add support for package-lock.json (#190)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

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.