Add regression test for CLI shebang preservation (#1901)
Following up on https://github.com/prettier/prettier/pull/1899
This commit is contained in:
1 parent
6a2c964b22
commit
f6dabc0d27
3 files changed
+18
No files matched your search
@@ -0,0 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`preserves shebang 1`] = `
|
||||
"#!/usr/bin/env node
|
||||
\\"use strict\\";
|
||||
"
|
||||
`;
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
const runPrettier = require("../runPrettier");
|
||||
|
||||
test("preserves shebang", () => {
|
||||
const result = runPrettier("cli/with-shebang", ["issue1890.js"]);
|
||||
|
||||
expect(result.stdout).toMatchSnapshot();
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
Reference in new issue
Block a user