Comparing version 1.0.0 to 1.0.1
@@ -5,3 +5,3 @@ { | ||
"author": "tbeseda", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"license": "Apache-2.0", | ||
@@ -46,2 +46,3 @@ "type": "module", | ||
"tap-arc.upstream-error": "npm run --silent tape.upstream-error | node index.js", | ||
"tap-arc.runtime-error": "npm run --silent tape.runtime-error | node index.js", | ||
"tape.diff": "tape test/mock/create-diff-tap.cjs", | ||
@@ -54,2 +55,3 @@ "tape.empty": "tape test/mock/create-empty-tap.cjs", | ||
"tape.upstream-error": "tape test/mock/create-upstream-error-tap.cjs", | ||
"tape.runtime-error": "tape test/mock/create-runtime-error-tap.js", | ||
"tape": "tape test/**/*-test.js | tap-min", | ||
@@ -64,8 +66,8 @@ "test": "npm run lint && npm run tape" | ||
"strip-ansi": "^7.1.0", | ||
"tap-parser": "^13.0.1", | ||
"tcompare": "^6.0.0" | ||
"tap-parser": "^15.0.0", | ||
"tcompare": "^6.1.0" | ||
}, | ||
"devDependencies": { | ||
"@architect/eslint-config": "^2.1.2", | ||
"@types/node": "^16.18.50", | ||
"@types/node": "^16.18.53", | ||
"eslint": "^8.49.0", | ||
@@ -72,0 +74,0 @@ "tap-min": "^3.0.0", |
@@ -1,2 +0,3 @@ | ||
import { strict } from 'tcompare' | ||
// eslint-disable-next-line import/no-unresolved | ||
import { strict } from 'tcompare' // what's going on with @tapjs packages? | ||
import JSON5 from 'json5' | ||
@@ -3,0 +4,0 @@ |
@@ -41,4 +41,4 @@ import { Chalk } from 'chalk' | ||
}, | ||
fail ({ id, name }) { | ||
return `${failMark} [${id}] ${red(name)}` | ||
fail ({ id, name, tapError }) { | ||
return `${failMark} ${tapError ? red(`"${tapError}"`) : `[${id}] ${red(name)}`}` | ||
}, | ||
@@ -45,0 +45,0 @@ skip ({ id, name }) { |
@@ -0,3 +1,4 @@ | ||
// eslint-disable-next-line import/no-unresolved | ||
import { Parser } from 'tap-parser' // what's going on with @tapjs packages? | ||
import { PassThrough } from 'stream' | ||
import { Parser } from 'tap-parser' | ||
import duplexer from 'duplexer3' // TODO: write a custom, simpler duplexer | ||
@@ -173,12 +174,17 @@ import stripAnsi from 'strip-ansi' | ||
if (!result.ok) { | ||
if ( | ||
result.failures[0] && | ||
result.failures[0].tapError && | ||
result.failures[0].tapError.startsWith('incorrect number of tests') | ||
) { | ||
// custom failure was created by tap-parser | ||
result.badCount = true // persisted to CLI process handler | ||
result.failures.shift() | ||
result.fail-- | ||
P(_.realBad(`\nExpected ${result.plan.end || '?'} assertions, parsed ${result.count || '?'}`)) | ||
const tapFailures = result.failures.filter((f) => f.tapError) | ||
for (const tapFailure of tapFailures){ | ||
const { tapError } = tapFailure | ||
if (tapError.startsWith('incorrect number of tests')) { | ||
// custom failure was created by tap-parser | ||
P(_.realBad(`\nExpected ${result.plan.end || '?'} assertions, parsed ${result.count || '?'}`)) | ||
result.badCount = true // persisted to CLI process handler | ||
result.failures.shift() | ||
result.fail-- | ||
} | ||
else if (tapError.startsWith('no plan')) | ||
P(_.realBad(`\nTAP test plan not found`)) | ||
else | ||
P(_.realBad(`\n${tapError}`)) | ||
} | ||
@@ -185,0 +191,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29668
397
+ Addedtap-parser@15.3.2(transitive)
+ Addedtap-yaml@2.2.2(transitive)
+ Addedyaml@2.6.0(transitive)
+ Addedyaml-types@0.3.0(transitive)
- Removedtap-parser@13.0.1(transitive)
- Removedtap-yaml@1.0.2(transitive)
- Removedyaml@1.10.2(transitive)
Updatedtap-parser@^15.0.0
Updatedtcompare@^6.1.0