Refactor test and annotate object literal
This commit is contained in:
parent
9b9032f8c5
commit
b6ea2f955a
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
Loading…
Reference in a new issue