Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/__fixtures__/print-code/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignored.js
2 changes: 2 additions & 0 deletions test/__fixtures__/print-code/ignored.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
foo(
)
2 changes: 2 additions & 0 deletions test/__fixtures__/print-code/not-ignored.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
foo(
)
5 changes: 5 additions & 0 deletions test/__tests__/__snapshots__/print-code.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Line breaking after filepath with errors (stdout) 1`] = `""`;

exports[`Line breaking after filepath with errors (stdout) 2`] = `"foo();"`;
10 changes: 10 additions & 0 deletions test/__tests__/print-code.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { runCli } from "../utils";

describe("Line breaking after filepath with errors", () => {
runCli("print-code", ["./ignored.js"], {
stdoutIsTTY: true,
}).test({ status: 0, write: [], stderr: "" });
runCli("print-code", ["./not-ignored.js"], {
stdoutIsTTY: true,
}).test({ status: 0, write: [], stderr: "" });
});