Fix --debug-print-doc (#2400)

* Add test of --debug-print-doc

See https://github.com/prettier/prettier/issues/2396

* Pass test of --debug-print-doc

See https://github.com/prettier/prettier/issues/2396
This commit is contained in:
Joseph Frazier authored and Christopher Chedeau committed 2017-07-05 18:25:51 +02:00
1 parent 8fcd667200
commit 16bc297572
2 files changed
+14 -1

No files matched your search

+1 -1
View File
@@ -154,7 +154,7 @@ const options = {
function format(input, opt) {
if (argv["debug-print-doc"]) {
const doc = prettier.__debug.printToDoc(input, opt);
return prettier.__debug.formatDoc(doc);
return { formatted: prettier.__debug.formatDoc(doc) };
}
if (argv["debug-check"]) {