From 9126d5404a19ce043ecf564768abce4e0e200b33 Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Fri, 8 Apr 2022 15:01:54 -0700 Subject: [PATCH] Don't skip tests named *Fourslash.ts --- src/testRunner/fourslashRunner.ts | 2 +- tests/cases/fourslash/commentsInterfaceFourslash.ts | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/testRunner/fourslashRunner.ts b/src/testRunner/fourslashRunner.ts index 4916ec6693f6e..b996542a0a55e 100644 --- a/src/testRunner/fourslashRunner.ts +++ b/src/testRunner/fourslashRunner.ts @@ -52,7 +52,7 @@ namespace Harness { const testIndex = fn.indexOf("tests/"); if (testIndex >= 0) fn = fn.substr(testIndex); - if (justName && !justName.match(/fourslash\.ts$/i) && !justName.match(/\.d\.ts$/i)) { + if (justName !== "fourslash.ts") { it(this.testSuiteName + " test " + justName + " runs correctly", () => { FourSlash.runFourSlashTest(this.basePath, this.testType, fn); }); diff --git a/tests/cases/fourslash/commentsInterfaceFourslash.ts b/tests/cases/fourslash/commentsInterfaceFourslash.ts index 3071ae47d5639..9501e9ba28723 100644 --- a/tests/cases/fourslash/commentsInterfaceFourslash.ts +++ b/tests/cases/fourslash/commentsInterfaceFourslash.ts @@ -81,15 +81,14 @@ verify.quickInfos({ verify.quickInfoAt("8", "(property) i2.x: number", "this is x"); verify.completions({ marker: "8", - exact: [ + exact: completion.functionMembersWithPrototypePlus([ { name: "x", text: "(property) i2.x: number", documentation: "this is x" }, { name: "foo", text: "(property) i2.foo: (b: number) => string", documentation: "this is foo" }, { name: "nc_x", text: "(property) i2.nc_x: number" }, { name: "nc_foo", text: "(property) i2.nc_foo: (b: number) => string" }, { name: "fnfoo", text: "(method) i2.fnfoo(b: number): string", documentation: "this is fnfoo" }, { name: "nc_fnfoo", text: "(method) i2.nc_fnfoo(b: number): string" }, - ...completion.functionMembersWithPrototype, - ], + ]), isNewIdentifierLocation: true, }); @@ -199,12 +198,12 @@ verify.quickInfoIs("(method) i3.f(a: number): string", "Function i3 f"); verify.completions({ marker: "41", exact: [ - { name: "x", text: "(property) i3.x: number", documentation: "Comment i3 x" }, { name: "f", text: "(method) i3.f(a: number): string", documentation: "Function i3 f" }, { name: "l", text: "(property) i3.l: (b: number) => string", documentation: "i3 l" }, - { name: "nc_x", text: "(property) i3.nc_x: number" }, { name: "nc_f", text: "(method) i3.nc_f(a: number): string" }, { name: "nc_l", text: "(property) i3.nc_l: (b: number) => string" }, + { name: "nc_x", text: "(property) i3.nc_x: number" }, + { name: "x", text: "(property) i3.x: number", documentation: "Comment i3 x" }, ], });