Skip to content

Commit 9b6c179

Browse files
authored
Fix parser test cases missing 'it' calls (#47545)
1 parent 5e38082 commit 9b6c179

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/testRunner/unittests/jsDocParsing.ts

+10-6
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,17 @@ oh.no
393393
assert.equal(last!.kind, SyntaxKind.EndOfFileToken);
394394
});
395395
});
396-
describe("getStart of node with JSDoc but no parent pointers", () => {
397-
const root = createSourceFile("foo.ts", "/** */var a = true;", ScriptTarget.ES5, /*setParentNodes*/ false);
398-
root.statements[0].getStart(root, /*includeJsdocComment*/ true);
396+
describe("getStart", () => {
397+
it("runs when node with JSDoc but no parent pointers", () => {
398+
const root = createSourceFile("foo.ts", "/** */var a = true;", ScriptTarget.ES5, /*setParentNodes*/ false);
399+
root.statements[0].getStart(root, /*includeJsdocComment*/ true);
400+
});
399401
});
400-
describe("missing type parameter in jsDoc doesn't create a 1-element array", () => {
401-
const doc = parseIsolatedJSDocComment("/**\n @template\n*/");
402-
assert.equal((doc?.jsDoc.tags?.[0] as JSDocTemplateTag).typeParameters.length, 0);
402+
describe("parseIsolatedJSDocComment", () => {
403+
it("doesn't create a 1-element array with missing type parameter in jsDoc", () => {
404+
const doc = parseIsolatedJSDocComment("/**\n @template\n*/");
405+
assert.equal((doc?.jsDoc.tags?.[0] as JSDocTemplateTag).typeParameters.length, 0);
406+
});
403407
});
404408
});
405409
}

0 commit comments

Comments
 (0)