Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tap-spot

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tap-spot - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

27

index.js

@@ -37,2 +37,5 @@ 'use strict';

// Hack to collect todo's for later filtering them out of the failures array
const todos = [];
const stream = duplexer(tap, out);

@@ -52,2 +55,3 @@

} else if (res.todo) {
todos.push(res);
char = symbols.todo;

@@ -64,6 +68,23 @@ } else if (res.ok) {

tap.on('complete', function(res) {
const fails = res.failures;
const fails = res.failures.filter(f => !todos.find(t => t === f));
console.log('fails', fails.length);
console.log('todos', todos.length);
outPush('\n');
if (todos.length > 0) {
todos.forEach(function (todo) {
const { operator, expected, actual, at } = todo.diag;
outPush(blue(`! TODO ${todo.name}`));
operator && outPush(`${blue('·') + yellow(' operator:')} ${operator}`);
expected && outPush(`${blue('·') + yellow(' expected:')} ${expected}`);
actual && outPush(`${blue('·') + yellow(' actual:')} ${actual}`);
at && outPush(`${blue('·') + yellow(' at:')} ${at}`);
outPush('');
});
}
if (fails.length > 0) {

@@ -75,3 +96,3 @@ stream.failed = true;

outPush(red(`✖ ${fail.name}`));
outPush(red(`✖ FAIL ${fail.name}`));
operator && outPush(`${red('|') + blue(' operator:')} ${operator}`);

@@ -91,3 +112,3 @@ expected && outPush(`${red('|') + blue(' expected:')} ${expected}`);

todo: String(res.todo || 0),
fail: String(res.fail || 0)
fail: String(fails.length || 0)
};

@@ -94,0 +115,0 @@

2

package.json
{
"name": "tap-spot",
"version": "1.0.1",
"version": "1.1.0",
"description": "Compact dot reporter for TAP output. Supports skip and todo",

@@ -5,0 +5,0 @@ "main": "./bin/dot.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc