webpipe-js 2.0.59 → 2.0.61

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
@@ -1826,7 +1826,7 @@ function printDescribe(describe) {
1826
1826
  case "mock":
1827
1827
  lines.push(printMock(entry.item));
1828
1828
  const nextItem = items[index + 1];
1829
- if (nextItem && nextItem.type === "mock") {
1829
+ if (nextItem && (nextItem.type === "mock" || nextItem.type === "comment")) {
1830
1830
  lines.push("");
1831
1831
  }
1832
1832
  break;
@@ -1883,6 +1883,9 @@ function prettyPrint(program) {
1883
1883
  const nextItem = allItems[index + 1];
1884
1884
  const shouldAddBlankLine = () => {
1885
1885
  if (!nextItem) return false;
1886
+ if (entry.type === "describe") {
1887
+ return false;
1888
+ }
1886
1889
  if (entry.type === "comment") {
1887
1890
  return nextItem.lineNumber - entry.lineNumber > 1;
1888
1891
  }
package/dist/index.mjs CHANGED
@@ -1773,7 +1773,7 @@ function printDescribe(describe) {
1773
1773
  case "mock":
1774
1774
  lines.push(printMock(entry.item));
1775
1775
  const nextItem = items[index + 1];
1776
- if (nextItem && nextItem.type === "mock") {
1776
+ if (nextItem && (nextItem.type === "mock" || nextItem.type === "comment")) {
1777
1777
  lines.push("");
1778
1778
  }
1779
1779
  break;
@@ -1830,6 +1830,9 @@ function prettyPrint(program) {
1830
1830
  const nextItem = allItems[index + 1];
1831
1831
  const shouldAddBlankLine = () => {
1832
1832
  if (!nextItem) return false;
1833
+ if (entry.type === "describe") {
1834
+ return false;
1835
+ }
1833
1836
  if (entry.type === "comment") {
1834
1837
  return nextItem.lineNumber - entry.lineNumber > 1;
1835
1838
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpipe-js",
3
- "version": "2.0.59",
3
+ "version": "2.0.61",
4
4
  "description": "Web Pipe parser",
5
5
  "license": "ISC",
6
6
  "author": "William Cotton",