Socket
Socket
Sign inDemoInstall

tap-parser

Package Overview
Dependencies
3
Maintainers
2
Versions
105
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.3.1 to 5.3.2

6

bin/cmd.js

@@ -86,3 +86,5 @@ #!/usr/bin/env node

case 'child':
return tapFormat(item[1], ' ')
var comment = item[1][0]
var child = item[1].slice(1)
return tapFormat([comment], '') + tapFormat(child, ' ')

@@ -113,3 +115,3 @@ case 'version':

(res.todo === true ? '' : ' ' + res.todo) : '') +
(res.time ? ' # time=' + res.time + 's' : '') +
(res.time ? ' # time=' + res.time + 'ms' : '') +
'\n' +

@@ -116,0 +118,0 @@ (res.diag ?

@@ -25,3 +25,3 @@ // Transforms a stream of TAP into a stream of result objects

var lineTypes = {
testPoint: /^(not )?ok(?: ([0-9]+))?(?:(?: -)?( .*))?\n$/,
testPoint: /^(not )?ok(?: ([0-9]+))?(?:(?: -)?( .*?))?(\{?)\n$/,
pragma: /^pragma ([+-])([a-z]+)\n$/,

@@ -49,3 +49,6 @@ bailout: /^bail out!(.*)\n$/i,

function parseDirective (line) {
line = line.trim()
if (!line.trim())
return false
line = line.replace(/\{\s*$/, '').trim()
var time = line.match(/^time=((?:[1-9][0-9]*|0)(?:\.[0-9]+)?)(ms|s)$/i)

@@ -73,2 +76,3 @@ if (time) {

var id = +(parsed[2] || count + 1)
var buffered = parsed[4]
this.ok = ok

@@ -86,3 +90,3 @@ this.id = id

if (!dir)
name += rest ? '#' + rest : ''
name += (rest ? '#' + rest : '') + buffered
else {

@@ -93,17 +97,13 @@ // handle buffered subtests with todo/skip on them, like

var dirValue = dir[1]
if (typeof dirValue === 'string' && dirValue.slice(-1) === '{') {
name += ' {'
dirValue = dirValue.slice(0, -1).trim()
if (!dirValue) {
dirValue = true
}
}
this[dirKey] = dirValue
}
if (/\{$/.test(name)) {
name = name.slice(0, -1).trim()
this.buffered = true
if (/\{\s*$/.test(name)) {
name = name.replace(/\{\s*$/, '')
buffered = '{'
}
if (buffered === '{')
this.buffered = true
if (name)

@@ -110,0 +110,0 @@ this.name = name.trim()

{
"name": "tap-parser",
"version": "5.3.1",
"version": "5.3.2",
"description": "parse the test anything protocol",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc