find-test-names
Advanced tools
Comparing version 1.9.3 to 1.9.4
{ | ||
"name": "find-test-names", | ||
"version": "1.9.3", | ||
"version": "1.9.4", | ||
"description": "Given a Mocha / Cypress spec file, returns the list of suite and test names", | ||
@@ -5,0 +5,0 @@ "main": "src", |
@@ -10,8 +10,8 @@ // @ts-check | ||
function formatTestList(tests, indent = 0) { | ||
const myIndent = spacer.repeat(indent) | ||
const lastIndex = tests.length - 1 | ||
if (!tests.length) { | ||
return `${myIndent}└─ (empty)` | ||
return `${spacer.repeat(indent > 0 ? indent - 1 : 0)}└─ (empty)` | ||
} | ||
const testsN = tests.length | ||
const lines = tests.map((test, k) => { | ||
@@ -34,4 +34,5 @@ let start | ||
const nestedLines = nested.split('\n') | ||
const includeSpacer = k < testsN - 1 ? spacerNeighbour : spacer | ||
const nestedLinesWithIndent = nestedLines.map((s) => { | ||
return spacer + s | ||
return includeSpacer + s | ||
}) | ||
@@ -38,0 +39,0 @@ |
19913
482