This commit is contained in:
Gabriela Araujo Britto
2021-09-30 10:35:40 -07:00
parent 905caad677
commit 8ad404270c
2 changed files with 40 additions and 34 deletions

View File

@@ -81,17 +81,6 @@
//// f/*g*/
////}
// @Filename: h.ts
// @noImplicitOverride: true // >> TODO: move this to a new test file, because this option is global
// Case: Suggested method needs `override` modifier
////class HBase {
//// foo(a: string): void {}
////}
////
////class HSub extends HBase {
//// f/*h*/
////}
// format.setFormatOptions({
// newLineCharacter: "\n",
// });
@@ -258,27 +247,4 @@ foo(a: undefined, b: number): string;\r\n\
foo(a: any, b?: any): string {\r\n $1;\r\n}\r\n",
}
],
});
verify.completions({
marker: "h",
isNewIdentifierLocation: true,
preferences: {
includeCompletionsWithInsertText: true,
includeCompletionsWithSnippetText: true,
},
includes: [
{
name: "foo",
sortText: completion.SortText.LocationPriority,
replacementSpan: {
fileName: "",
pos: 0,
end: 0,
},
isSnippet: true,
insertText:
"override foo(): void {\r\n $1;\r\n}\r\n",
}
],
});

View File

@@ -0,0 +1,40 @@
/// <reference path="fourslash.ts" />
// @Filename: h.ts
// @noImplicitOverride: true
// Case: Suggested method needs `override` modifier
////class HBase {
//// foo(a: string): void {}
////}
////
////class HSub extends HBase {
//// f/*h*/
////}
// format.setFormatOptions({
// newLineCharacter: "\n",
// });
// format.setOption("newline", "\n");
verify.completions({
marker: "h",
isNewIdentifierLocation: true,
preferences: {
includeCompletionsWithInsertText: true,
includeCompletionsWithSnippetText: true,
},
includes: [
{
name: "foo",
sortText: completion.SortText.LocationPriority,
replacementSpan: {
fileName: "",
pos: 0,
end: 0,
},
isSnippet: true,
insertText:
"override foo(a: string): void {\r\n $1;\r\n}\r\n",
}
],
});