Refactor test and annotate object literal

This commit is contained in:
uniqueiniquity 2017-10-31 14:52:15 -07:00
parent 9b9032f8c5
commit b6ea2f955a
2 changed files with 11 additions and 19 deletions

View file

@ -715,7 +715,7 @@ namespace ts.formatting {
processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta);
if (child.kind === SyntaxKind.JsxText) {
const range = { pos: child.getStart(), end: child.getEnd() };
const range: TextRange = { pos: child.getStart(), end: child.getEnd() };
indentMultilineCommentOrJsxText(range, childIndentation.indentation, /*firstLineIsIndented*/ true, /*indentFinalLine*/ false);
}

View file

@ -4,28 +4,20 @@
////function foo () {
//// return (
//// <div>
////hello
////goodbye
/////*0*/hello
/////*1*/goodbye
//// </div>
//// )
////}
goTo.position(21);
verify.textAtCaretIs("return");
goTo.position(38);
verify.textAtCaretIs("<div>");
goTo.position(44);
verify.textAtCaretIs("hello");
goTo.position(50);
verify.textAtCaretIs("goodbye");
goTo.marker('0');
verify.currentLineContentIs("hello");
goTo.marker('1');
verify.currentLineContentIs("goodbye");
format.document();
goTo.position(21);
verify.textAtCaretIs("return");
goTo.position(38);
verify.textAtCaretIs("<div>");
goTo.position(56);
verify.textAtCaretIs("hello");
goTo.position(74);
verify.textAtCaretIs("goodbye");
goTo.marker('0');
verify.currentLineContentIs(" hello");
goTo.marker('1');
verify.currentLineContentIs(" goodbye");