Socket
Socket
Sign inDemoInstall

tap-parser

Package Overview
Dependencies
4
Maintainers
2
Versions
106
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.1.3

test/fixtures/extra-in-child.js

2

bin/cmd.js

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

var parser = new Parser()
var events = etoa(parser, [ 'pipe', 'unpipe', 'prefinish', 'finish' ])
var events = etoa(parser, [ 'pipe', 'unpipe', 'prefinish', 'finish', 'line' ])

@@ -56,0 +56,0 @@ process.stdin.pipe(parser)

@@ -356,6 +356,14 @@ // Transforms a stream of TAP into a stream of result objects

// still belongs to the child.
if (this.child && line.indexOf(this.child.indent) === 0) {
line = line.substr(this.child.indent.length)
this.child.write(line)
return
if (this.child) {
if (line.indexOf(this.child.indent) === 0) {
line = line.substr(this.child.indent.length)
this.child.write(line)
return
}
// a child test can only end when we get an test point line.
// anything else is extra.
if (!/^(not )?ok/.test(line)) {
this.emit('extra', line)
return
}
}

@@ -362,0 +370,0 @@

{
"name": "tap-parser",
"version": "1.1.2",
"version": "1.1.3",
"description": "parse the test anything protocol",

@@ -49,3 +49,6 @@ "main": "index.js",

},
"license": "MIT"
"license": "MIT",
"optionalDependencies": {
"readable-stream": "^1.1.13"
}
}

@@ -26,6 +26,3 @@ module.exports =

[ 'line', ' ...\n' ],
[ 'child',
[ [ 'line', '...\n' ],
[ 'extra', '...\n' ],
[ 'complete', { ok: false, count: 0, pass: 0 } ] ] ],
[ 'extra', ' ...\n' ],
[ 'line', 'ok 2 - child test\n' ],

@@ -32,0 +29,0 @@ [ 'line', 'ok 3 - should come last\n' ],

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