mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Don't normalize whitespace in fourslash tests (#18447)
* Don't normalize whitespace in fourslash tests * Only render whitespace when the diff is text-only
This commit is contained in:
@@ -17,5 +17,4 @@ verify.currentFileContentIs(`class C {
|
||||
()=>{ this.foo === 10 };
|
||||
}
|
||||
}
|
||||
C.foo = undefined;
|
||||
`);
|
||||
C.foo = undefined;` + "\r\n"); // TODO: GH#18445
|
||||
|
||||
@@ -13,5 +13,4 @@ verify.getAndApplyCodeFix(/*errorCode*/ undefined, /*index*/ 2)
|
||||
verify.currentFileContentIs(`class C {
|
||||
static p = ()=>{ this.foo === 10 };
|
||||
}
|
||||
C.foo = undefined;
|
||||
`);
|
||||
C.foo = undefined;` + "\r\n"); // TODO: GH#18445
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
//// super();
|
||||
//// |]}
|
||||
////}
|
||||
// TODO: GH#18445
|
||||
verify.rangeAfterCodeFix(`
|
||||
super();
|
||||
super();\r
|
||||
this.a = 12;
|
||||
`, /*includeWhiteSpace*/ true);
|
||||
`, /*includeWhiteSpace*/ true);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//// constructor() {[|
|
||||
//// |]}
|
||||
////}
|
||||
// TODO: GH#18445
|
||||
verify.rangeAfterCodeFix(`
|
||||
super();
|
||||
super();\r
|
||||
`, /*includeWhitespace*/ true);
|
||||
|
||||
@@ -19,7 +19,7 @@ edit.applyRefactor({
|
||||
`function foo() {
|
||||
var i = 10;
|
||||
var __return: any;
|
||||
({ __return, i } = n/*RENAME*/ewFunction(i));
|
||||
({ __return, i } = /*RENAME*/newFunction(i));
|
||||
return __return;
|
||||
}
|
||||
function newFunction(i) {
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
////}
|
||||
|
||||
format.document();
|
||||
verify.currentFileContentIs("class C {\r\n\
|
||||
<<<<<<< HEAD\r\n\
|
||||
v = 1;\r\n\
|
||||
||||||| merged common ancestors\r\n\
|
||||
v = 3;\r\n\
|
||||
=======\r\n\
|
||||
v = 2;\r\n\
|
||||
>>>>>>> Branch - a\r\n\
|
||||
}");
|
||||
verify.currentFileContentIs(`class C {
|
||||
<<<<<<< HEAD
|
||||
v = 1;
|
||||
||||||| merged common ancestors
|
||||
v = 3;
|
||||
=======
|
||||
v = 2;
|
||||
>>>>>>> Branch - a
|
||||
}`);
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
////}
|
||||
|
||||
format.document();
|
||||
verify.currentFileContentIs("class C {\r\n\
|
||||
<<<<<<< HEAD\r\n\
|
||||
v = 1;\r\n\
|
||||
=======\r\n\
|
||||
v = 2;\r\n\
|
||||
>>>>>>> Branch - a\r\n\
|
||||
}");
|
||||
verify.currentFileContentIs(`class C {
|
||||
<<<<<<< HEAD
|
||||
v = 1;
|
||||
=======
|
||||
v = 2;
|
||||
>>>>>>> Branch - a
|
||||
}`);
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
////x;|]
|
||||
|
||||
goTo.file("/b.ts");
|
||||
verify.rangeAfterCodeFix(`import { x } from "./a";
|
||||
|
||||
// TODO:GH#18445
|
||||
verify.rangeAfterCodeFix(`import { x } from "./a";\r
|
||||
\r
|
||||
export { x } from "./a";
|
||||
x;`, /*includeWhiteSpace*/ true);
|
||||
|
||||
Reference in New Issue
Block a user