mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-07 18:25:51 -05:00
Fix parser test cases missing 'it' calls (#47545)
This commit is contained in:
@@ -393,13 +393,17 @@ oh.no
|
||||
assert.equal(last!.kind, SyntaxKind.EndOfFileToken);
|
||||
});
|
||||
});
|
||||
describe("getStart of node with JSDoc but no parent pointers", () => {
|
||||
const root = createSourceFile("foo.ts", "/** */var a = true;", ScriptTarget.ES5, /*setParentNodes*/ false);
|
||||
root.statements[0].getStart(root, /*includeJsdocComment*/ true);
|
||||
describe("getStart", () => {
|
||||
it("runs when node with JSDoc but no parent pointers", () => {
|
||||
const root = createSourceFile("foo.ts", "/** */var a = true;", ScriptTarget.ES5, /*setParentNodes*/ false);
|
||||
root.statements[0].getStart(root, /*includeJsdocComment*/ true);
|
||||
});
|
||||
});
|
||||
describe("missing type parameter in jsDoc doesn't create a 1-element array", () => {
|
||||
const doc = parseIsolatedJSDocComment("/**\n @template\n*/");
|
||||
assert.equal((doc?.jsDoc.tags?.[0] as JSDocTemplateTag).typeParameters.length, 0);
|
||||
describe("parseIsolatedJSDocComment", () => {
|
||||
it("doesn't create a 1-element array with missing type parameter in jsDoc", () => {
|
||||
const doc = parseIsolatedJSDocComment("/**\n @template\n*/");
|
||||
assert.equal((doc?.jsDoc.tags?.[0] as JSDocTemplateTag).typeParameters.length, 0);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user