Giter Site home page Giter Site logo

tap-dot's Introduction

tap-dot NPM version NPM download count

Formatted TAP output with dots ...

Passed tests

Passed tests

Failed tests

Failed tests

Install

npm install tap-dot --save-dev

Usage

package.json

{
  "name": "module-name",
  "scripts": {
    "test": "node ./test/tap-test.js | tap-dot"
  }
}

Then run with npm test

Terminal

tape test/index.js | node_modules/.bin/tap-dot

Testling

npm install testling -g
testling test/index.js | node_modules/.bin/tap-dot

tap-dot's People

Contributors

arve0 avatar bdesham avatar jameskmonger avatar jasonbellamy avatar jasonpincin avatar jprichardson avatar orangejulius avatar scottcorgan avatar shinnn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tap-dot's Issues

fail if tape failed

Right now, tests run with node test.js | tap-dot will pass even if test.js throws an error immediately. The well-known tap-spec reporter changed this behaviour as of scottcorgan/tap-spec#40.

Thanks for this great module!

Test count is incorrect

Given this input:

TAP version 13
ok 1 a
ok 2 b
ok 3 c
ok 4 d
ok 5 e
1..5
# all tests passed
# test finished in 0.055 s

I got this output:

  .....

  2 tests
  5 passed

  Pass!

The count is showing the number of comment lines. This is a problem with v1.0.1, but not v1.0.0.

t.comment() gets swallowed

When I write a test like this

import test from 'tape';

test('foo', t => {
  t.plan(1);
  t.comment('It was me');
  t.pass();
});

I don't see my comment It was me. Would it be possible to print that out with tap-dot?

No YAML output for failing tests

Hi @scottcorgan,

I have this TAP output:

# it gets the correct least significant bit [TestCase: 0]
not ok 7 should be equal
  ---
    operator: equal
    expected: 1111
    actual:   0
  ...

This should result in the YAML output being displayed by tap-dot (see the TAP 13 specification).

This expected behaviour can be seen in the screenshots in README.

expected

However when I then pipe the output to tap-dot, I get the following output:

actual

Please dump diffs of the failed assertions

I really love dot reporter as it provides much less noise than the common ones, but on large test suites where all that you have is lots of comparisons, this is rather unhelpful:

screen shot 2016-05-06 at 9 51 26 am

Could you please dump the diffs reported by tap instead of just messages?

Stream parser

I would love if this had the same stream parser as tap-spec.

Think it is doable?

Thank you!

Allow gulp usage

It would be useful to be able to require this into a gulpfile and use it with the gulp-tape plugin.

Tests pass when error is thrown

When the tested code throws an error, you get output similar to:

>  node test | tap-dot

module.js:340
    throw err;
          ^
Error: Cannot find module 'trimmer'
    at <stack trace here>

  0 tests
  0 passed

  Pass!

I guess the test should fail, as it does without any reporter, or with substack/faucet.

Add a license file

I’d like to use this package at work, but I’m unable to use something that doesn’t have a license listed (since the implicit status is then “all rights reserved”). Could you please specify which license this project is released under?

Vulnerable dependency trim

npm audit reports that the version of trim that is used by tap-dot is vulnerable.

=== npm audit security report ===                        
                                                                                
                                                                                
                                 Manual Review                                  
             Some vulnerabilities require your attention to resolve             
                                                                                
          Visit https://go.npm.me/audit-guide for additional guidance           
                                                                                
                                                                                
  High            Regular Expression Denial of Service in trim                  
                                                                                
  Package         trim                                                          
                                                                                
  Patched in      >=0.0.3                                                       
                                                                                
  Dependency of   tap-dot [dev]                                                 
                                                                                
  Path            tap-dot > tap-out > trim                                      
                                                                                
  More info       https://github.com/advisories/GHSA-w5p7-h5w8-2hfq             
                                                                                
found 1 high severity vulnerability in 531 scanned packages
  1 vulnerability requires manual review. See the full report for details.

TypeError: Cannot read property 'replace' of undefined

 12:59:54  dan@elise:~/stuff/vernamtools   master ✘ ✹ ✭ 
$ npm test

> [email protected] test /Users/dan/stuff/vernamtools
> ava -t test/index.js | tap-dot


  .......xx/Users/dan/stuff/vernamtools/node_modules/tap-out/index.js:152
      .replace('(', '')
      ^

TypeError: Cannot read property 'replace' of undefined
    at Parser._handleError (/Users/dan/stuff/vernamtools/node_modules/tap-out/index.js:152:7)
    at Parser.handleLine (/Users/dan/stuff/vernamtools/node_modules/tap-out/index.js:45:8)
    at Stream.<anonymous> (/Users/dan/stuff/vernamtools/node_modules/tap-out/index.js:200:14)
    at emitOne (events.js:77:13)
    at Stream.emit (events.js:169:7)
    at drain (/Users/dan/stuff/vernamtools/node_modules/through/index.js:36:16)
    at Stream.stream.queue.stream.push (/Users/dan/stuff/vernamtools/node_modules/through/index.js:45:5)
    at emit (/Users/dan/stuff/vernamtools/node_modules/split/index.js:37:14)
    at next (/Users/dan/stuff/vernamtools/node_modules/split/index.js:49:7)
    at Stream.<anonymous> (/Users/dan/stuff/vernamtools/node_modules/split/index.js:54:5)
npm ERR! Test failed.  See above for more details.

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.