webpipe-js 2.0.58 → 2.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1813,7 +1813,7 @@ function printDescribe(describe) {
1813
1813
  });
1814
1814
  items.sort((a, b) => a.lineNumber - b.lineNumber);
1815
1815
  let lastType = null;
1816
- items.forEach((entry) => {
1816
+ items.forEach((entry, index) => {
1817
1817
  if (lastType === "variable" && entry.type !== "variable") {
1818
1818
  lines.push("");
1819
1819
  }
@@ -1825,6 +1825,10 @@ function printDescribe(describe) {
1825
1825
  break;
1826
1826
  case "mock":
1827
1827
  lines.push(printMock(entry.item));
1828
+ const nextItem = items[index + 1];
1829
+ if (nextItem && (nextItem.type === "mock" || nextItem.type === "comment")) {
1830
+ lines.push("");
1831
+ }
1828
1832
  break;
1829
1833
  case "comment":
1830
1834
  lines.push(` ${printComment(entry.item)}`);
package/dist/index.mjs CHANGED
@@ -1760,7 +1760,7 @@ function printDescribe(describe) {
1760
1760
  });
1761
1761
  items.sort((a, b) => a.lineNumber - b.lineNumber);
1762
1762
  let lastType = null;
1763
- items.forEach((entry) => {
1763
+ items.forEach((entry, index) => {
1764
1764
  if (lastType === "variable" && entry.type !== "variable") {
1765
1765
  lines.push("");
1766
1766
  }
@@ -1772,6 +1772,10 @@ function printDescribe(describe) {
1772
1772
  break;
1773
1773
  case "mock":
1774
1774
  lines.push(printMock(entry.item));
1775
+ const nextItem = items[index + 1];
1776
+ if (nextItem && (nextItem.type === "mock" || nextItem.type === "comment")) {
1777
+ lines.push("");
1778
+ }
1775
1779
  break;
1776
1780
  case "comment":
1777
1781
  lines.push(` ${printComment(entry.item)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpipe-js",
3
- "version": "2.0.58",
3
+ "version": "2.0.60",
4
4
  "description": "Web Pipe parser",
5
5
  "license": "ISC",
6
6
  "author": "William Cotton",