mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 10:46:28 -05:00
fix test
This commit is contained in:
@@ -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",
|
||||
}
|
||||
],
|
||||
});
|
||||
40
tests/cases/fourslash/completionsOverridingMethod1.ts
Normal file
40
tests/cases/fourslash/completionsOverridingMethod1.ts
Normal 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",
|
||||
}
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user