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

tape

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tape - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

27

lib/results.js

@@ -22,3 +22,3 @@ var Stream = require('stream');

nextTick(function next () {
var t = results.tests.shift();
var t = getNextTest(results);
if (!t && results.running) return;

@@ -46,3 +46,3 @@ if (!t) return results.close();

if (self.only && self.only !== t.name && !parentT) {
var nt = self.tests.shift();
var nt = getNextTest(self);
if (nt) nt.run()

@@ -99,3 +99,3 @@ else self.close();

if (t._skip) {
var nt = self.tests.shift();
var nt = getNextTest(self);
if (nt) nt.run();

@@ -110,4 +110,5 @@ else self.close();

if (self.running === 0 && self.tests.length) {
var nt = self.tests.shift();
nt.run();
var nt = getNextTest(self);
if (nt) nt.run();
else self.close();
}

@@ -198,1 +199,17 @@ else if (self.running === 0) {

}
function getNextTest(results) {
if (!results.only) {
return results.tests.shift();
}
do {
var t = results.tests.shift();
if (!t) {
return null;
}
if (results.only === t.name) {
return t;
}
} while (results.tests.length !== 0)
}

2

package.json
{
"name" : "tape",
"version" : "1.0.4",
"version" : "1.1.0",
"description" : "tap-producing test harness for node and browsers",

@@ -5,0 +5,0 @@ "main" : "index.js",

@@ -7,2 +7,3 @@ var tap = require('tap');

var tc = tap.createConsumer();
var ran = [];

@@ -29,2 +30,3 @@ var rows = []

])
tt.deepEqual(ran, [ 3 ]);

@@ -37,2 +39,3 @@ tt.end()

test("never run fail", function (t) {
ran.push(1);
t.equal(true, false)

@@ -43,2 +46,3 @@ t.end()

test("never run success", function (t) {
ran.push(2);
t.equal(true, true)

@@ -49,2 +53,3 @@ t.end()

test.only("run success", function (t) {
ran.push(3);
t.ok(true, "assert name")

@@ -51,0 +56,0 @@ t.end()

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