mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 06:41:59 -06:00
Rename "getScriptLexicalStructureList" to "navigationBar" in fourslash test helpers and remove unnecessary duplicate helpers
This commit is contained in:
parent
df8e7409c1
commit
bbbe3666b6
@ -1912,47 +1912,6 @@ namespace FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyNavigationBarCount(count: number) {
|
||||
const actual = this.navigationBarItems().length;
|
||||
if (actual !== count) {
|
||||
this.raiseError(`Expected ${count} items in navigation bar, got ${actual}`);
|
||||
}
|
||||
}
|
||||
|
||||
public verifyNavigationBarItem(text: string, kind: string) {
|
||||
this.verifyNavigationBarItemExists(this.navigationBarItems(), text, kind);
|
||||
}
|
||||
|
||||
public verifyNavigationBarChildItem(parent: string, text: string, kind: string) {
|
||||
const items = this.navigationBarItems();
|
||||
|
||||
// TODO: ts.find?
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
if (item.text === parent) {
|
||||
this.verifyNavigationBarItemExists(item.childItems, text, kind);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.raiseError(`Could not find any parent named ${parent} in: ${JSON.stringify(items, undefined, 2)}`);
|
||||
}
|
||||
|
||||
private navigationBarItems() {
|
||||
return this.languageService.getNavigationBarItems(this.activeFile.fileName);
|
||||
}
|
||||
|
||||
private verifyNavigationBarItemExists(items: ts.NavigationBarItem[], text: string, kind: string) {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
if (item.text === text && item.kind === kind) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.raiseError(`Could not find ${JSON.stringify({text, kind}, undefined, 2)} in the navigation bar: ${JSON.stringify(items, undefined, 2)}`);
|
||||
}
|
||||
|
||||
/*
|
||||
Check number of navigationItems which match both searchValue and matchKind.
|
||||
Report an error if expected value and actual value do not match.
|
||||
@ -2009,12 +1968,12 @@ namespace FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyGetScriptLexicalStructureListCount(expected: number) {
|
||||
public verifyNavigationBarCount(expected: number) {
|
||||
const items = this.languageService.getNavigationBarItems(this.activeFile.fileName);
|
||||
const actual = this.getNavigationBarItemsCount(items);
|
||||
|
||||
if (expected !== actual) {
|
||||
this.raiseError(`verifyGetScriptLexicalStructureListCount failed - found: ${actual} navigation items, expected: ${expected}.`);
|
||||
this.raiseError(`verifyNavigationBarCount failed - found: ${actual} navigation items, expected: ${expected}.`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2030,19 +1989,19 @@ namespace FourSlash {
|
||||
return result;
|
||||
}
|
||||
|
||||
public verifyGetScriptLexicalStructureListContains(name: string, kind: string) {
|
||||
public verifyNavigationBarContains(name: string, kind: string) {
|
||||
const items = this.languageService.getNavigationBarItems(this.activeFile.fileName);
|
||||
|
||||
if (!items || items.length === 0) {
|
||||
this.raiseError("verifyGetScriptLexicalStructureListContains failed - found 0 navigation items, expected at least one.");
|
||||
this.raiseError("verifyNavigationBarContains failed - found 0 navigation items, expected at least one.");
|
||||
}
|
||||
|
||||
if (this.navigationBarItemsContains(items, name, kind)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const missingItem = { name: name, kind: kind };
|
||||
this.raiseError(`verifyGetScriptLexicalStructureListContains failed - could not find the item: ${JSON.stringify(missingItem, undefined, 2)} in the returned list: (${JSON.stringify(items, undefined, 2)})`);
|
||||
const missingItem = { name, kind };
|
||||
this.raiseError(`verifyNavigationBarContains failed - could not find the item: ${JSON.stringify(missingItem, undefined, 2)} in the returned list: (${JSON.stringify(items, undefined, 2)})`);
|
||||
}
|
||||
|
||||
private navigationBarItemsContains(items: ts.NavigationBarItem[], name: string, kind: string) {
|
||||
@ -2062,6 +2021,20 @@ namespace FourSlash {
|
||||
return false;
|
||||
}
|
||||
|
||||
public verifyNavigationBarChildItem(parent: string, name: string, kind: string) {
|
||||
const items = this.languageService.getNavigationBarItems(this.activeFile.fileName);
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
if (item.text === parent) {
|
||||
if (this.navigationBarItemsContains(item.childItems, name, kind))
|
||||
return;
|
||||
const missingItem = { name, kind };
|
||||
this.raiseError(`verifyNavigationBarChildItem failed - could not find the item: ${JSON.stringify(missingItem)} in the children list: (${JSON.stringify(item.childItems, undefined, 2)})`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public printNavigationItems(searchValue: string) {
|
||||
const items = this.languageService.getNavigateToItems(searchValue);
|
||||
const length = items && items.length;
|
||||
@ -2074,7 +2047,7 @@ namespace FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public printScriptLexicalStructureItems() {
|
||||
public printNavigationBar() {
|
||||
const items = this.languageService.getNavigationBarItems(this.activeFile.fileName);
|
||||
const length = items && items.length;
|
||||
|
||||
@ -3070,31 +3043,23 @@ namespace FourSlashInterface {
|
||||
this.DocCommentTemplate(/*expectedText*/ undefined, /*expectedOffset*/ undefined, /*empty*/ true);
|
||||
}
|
||||
|
||||
public getScriptLexicalStructureListCount(count: number) {
|
||||
this.state.verifyGetScriptLexicalStructureListCount(count);
|
||||
public navigationBarCount(count: number) {
|
||||
this.state.verifyNavigationBarCount(count);
|
||||
}
|
||||
|
||||
// TODO: figure out what to do with the unused arguments.
|
||||
public getScriptLexicalStructureListContains(
|
||||
public navigationBarContains(
|
||||
name: string,
|
||||
kind: string,
|
||||
fileName?: string,
|
||||
parentName?: string,
|
||||
isAdditionalSpan?: boolean,
|
||||
markerPosition?: number) {
|
||||
this.state.verifyGetScriptLexicalStructureListContains(name, kind);
|
||||
this.state.verifyNavigationBarContains(name, kind);
|
||||
}
|
||||
|
||||
public navigationBarCount(count: number) {
|
||||
this.state.verifyNavigationBarCount(count);
|
||||
}
|
||||
|
||||
public navigationBarItem(text: string, kind: string) {
|
||||
this.state.verifyNavigationBarItem(text, kind);
|
||||
}
|
||||
|
||||
public navigationBarChildItem(parent: string, text: string, kind: string) {
|
||||
this.state.verifyNavigationBarChildItem(parent, text, kind);
|
||||
public navigationBarChildItem(parent: string, name: string, kind: string) {
|
||||
this.state.verifyNavigationBarChildItem(parent, name, kind);
|
||||
}
|
||||
|
||||
public navigationItemsListCount(count: number, searchValue: string, matchKind?: string) {
|
||||
@ -3287,8 +3252,8 @@ namespace FourSlashInterface {
|
||||
this.state.printNavigationItems(searchValue);
|
||||
}
|
||||
|
||||
public printScriptLexicalStructureItems() {
|
||||
this.state.printScriptLexicalStructureItems();
|
||||
public printNavigationBar() {
|
||||
this.state.printNavigationBar();
|
||||
}
|
||||
|
||||
public printReferences() {
|
||||
|
||||
@ -5,4 +5,4 @@
|
||||
|
||||
goTo.marker();
|
||||
edit.deleteAtCaret('class Bar { }'.length);
|
||||
verify.getScriptLexicalStructureListContains('Foo', 'enum', 'tests/cases/fourslash/deleteClassWithEnumPresent.ts', '');
|
||||
verify.navigationBarContains('Foo', 'enum', 'tests/cases/fourslash/deleteClassWithEnumPresent.ts', '');
|
||||
@ -175,10 +175,8 @@ declare namespace FourSlashInterface {
|
||||
DocCommentTemplate(expectedText: string, expectedOffset: number, empty?: boolean): void;
|
||||
noDocCommentTemplate(): void;
|
||||
|
||||
getScriptLexicalStructureListCount(count: number): void;
|
||||
getScriptLexicalStructureListContains(name: string, kind: string, fileName?: string, parentName?: string, isAdditionalSpan?: boolean, markerPosition?: number): void;
|
||||
navigationBarCount(count: number);
|
||||
navigationBarItem(text: string, kind: string): void;
|
||||
navigationBarCount(count: number): void;
|
||||
navigationBarContains(name: string, kind: string, fileName?: string, parentName?: string, isAdditionalSpan?: boolean, markerPosition?: number): void;
|
||||
navigationBarChildItem(parent: string, text: string, kind: string): void;
|
||||
navigationItemsListCount(count: number, searchValue: string, matchKind?: string): void;
|
||||
navigationItemsListContains(name: string, kind: string, searchValue: string, matchKind: string, fileName?: string, parentName?: string): void;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
//// ["bar"]: string;
|
||||
////}
|
||||
|
||||
verify.navigationBarCount(1);
|
||||
verify.navigationBarItem("C", "class");
|
||||
verify.navigationBarCount(3);
|
||||
verify.navigationBarContains("C", "class");
|
||||
verify.navigationBarChildItem("C", "[\"bar\"]", "property");
|
||||
verify.navigationBarChildItem("C", "foo", "property");
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
//// {| "itemName": "c", "kind": "const", "parentName": "" |}const c = 0;
|
||||
|
||||
test.markers().forEach(marker => {
|
||||
verify.getScriptLexicalStructureListContains(
|
||||
verify.navigationBarContains(
|
||||
marker.data.itemName,
|
||||
marker.data.kind,
|
||||
marker.fileName,
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
test.markers().forEach(marker => {
|
||||
if (marker.data) {
|
||||
verify.getScriptLexicalStructureListContains(
|
||||
verify.navigationBarContains(
|
||||
marker.data.itemName,
|
||||
marker.data.kind,
|
||||
marker.fileName,
|
||||
@ -38,4 +38,4 @@ test.markers().forEach(marker => {
|
||||
marker.position);
|
||||
}
|
||||
});
|
||||
verify.getScriptLexicalStructureListCount(12);
|
||||
verify.navigationBarCount(12);
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
test.markers().forEach(marker => {
|
||||
goTo.file(marker.fileName);
|
||||
verify.getScriptLexicalStructureListContains(
|
||||
verify.navigationBarContains(
|
||||
marker.data.itemName,
|
||||
marker.data.kind,
|
||||
marker.fileName,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
//// {| "itemName": "c", "kind": "let", "parentName": "" |}let c = 0;
|
||||
|
||||
test.markers().forEach(marker => {
|
||||
verify.getScriptLexicalStructureListContains(
|
||||
verify.navigationBarContains(
|
||||
marker.data.itemName,
|
||||
marker.data.kind,
|
||||
marker.fileName,
|
||||
|
||||
@ -6,16 +6,16 @@
|
||||
////const bar1, [c, d]
|
||||
////var {e, x: [f, g]} = {a:1, x:[]};
|
||||
|
||||
verify.getScriptLexicalStructureListCount(12); // global (1) + variable declarations (4) + binding patterns (7)
|
||||
verify.getScriptLexicalStructureListContains("foo", "var");
|
||||
verify.getScriptLexicalStructureListContains("bar", "var");
|
||||
verify.getScriptLexicalStructureListContains("foo1", "let")
|
||||
verify.getScriptLexicalStructureListContains("a", "let");
|
||||
verify.getScriptLexicalStructureListContains("b", "let");
|
||||
verify.getScriptLexicalStructureListContains("bar1", "const");
|
||||
verify.getScriptLexicalStructureListContains("c", "const");
|
||||
verify.getScriptLexicalStructureListContains("d", "const");
|
||||
verify.getScriptLexicalStructureListContains("e", "var");
|
||||
verify.getScriptLexicalStructureListContains("f", "var");
|
||||
verify.getScriptLexicalStructureListContains("g", "var");
|
||||
verify.navigationBarCount(12); // global (1) + variable declarations (4) + binding patterns (7)
|
||||
verify.navigationBarContains("foo", "var");
|
||||
verify.navigationBarContains("bar", "var");
|
||||
verify.navigationBarContains("foo1", "let")
|
||||
verify.navigationBarContains("a", "let");
|
||||
verify.navigationBarContains("b", "let");
|
||||
verify.navigationBarContains("bar1", "const");
|
||||
verify.navigationBarContains("c", "const");
|
||||
verify.navigationBarContains("d", "const");
|
||||
verify.navigationBarContains("e", "var");
|
||||
verify.navigationBarContains("f", "var");
|
||||
verify.navigationBarContains("g", "var");
|
||||
|
||||
|
||||
@ -11,4 +11,4 @@
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.getScriptLexicalStructureListCount(6); // 2x(class + field + constructor)
|
||||
verify.navigationBarCount(6); // 2x(class + field + constructor)
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.getScriptLexicalStructureListContains("Test", "class");
|
||||
verify.getScriptLexicalStructureListContains("constructor", "constructor");
|
||||
verify.navigationBarContains("Test", "class");
|
||||
verify.navigationBarContains("constructor", "constructor");
|
||||
|
||||
// no other items
|
||||
verify.getScriptLexicalStructureListCount(2);
|
||||
verify.navigationBarCount(2);
|
||||
@ -11,8 +11,8 @@
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
if (marker.data) {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
}
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(4);
|
||||
verify.navigationBarCount(4);
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
////}
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(8); // 4 functions + global. Note: there are 8 because of the functions show up at the top level and as child items.
|
||||
verify.navigationBarCount(8); // 4 functions + global. Note: there are 8 because of the functions show up at the top level and as child items.
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
////}
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(3); // <global> and 'f'.
|
||||
verify.navigationBarCount(3); // <global> and 'f'.
|
||||
@ -7,7 +7,7 @@
|
||||
////}
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(3); // <global> and 'f'
|
||||
verify.navigationBarCount(3); // <global> and 'f'
|
||||
@ -18,8 +18,8 @@
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
if (marker.data) {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
}
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(9);
|
||||
verify.navigationBarCount(9);
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
////}
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
// no other items
|
||||
verify.getScriptLexicalStructureListCount(17);
|
||||
verify.navigationBarCount(17);
|
||||
|
||||
@ -45,8 +45,8 @@
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
if (marker.data) {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
}
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(23);
|
||||
verify.navigationBarCount(23);
|
||||
|
||||
@ -8,5 +8,5 @@ edit.insertLine("module A");
|
||||
edit.insert("export class ");
|
||||
|
||||
// should not crash
|
||||
verify.getScriptLexicalStructureListCount(2);
|
||||
verify.navigationBarCount(2);
|
||||
|
||||
|
||||
@ -30,15 +30,15 @@
|
||||
////}
|
||||
|
||||
goTo.marker("file1");
|
||||
verify.getScriptLexicalStructureListCount(0);
|
||||
verify.navigationBarCount(0);
|
||||
|
||||
goTo.marker("file2");
|
||||
verify.getScriptLexicalStructureListContains("<global>", "module");
|
||||
verify.getScriptLexicalStructureListContains("x", "var");
|
||||
verify.getScriptLexicalStructureListCount(2);
|
||||
verify.navigationBarContains("<global>", "module");
|
||||
verify.navigationBarContains("x", "var");
|
||||
verify.navigationBarCount(2);
|
||||
|
||||
goTo.marker("file3");
|
||||
verify.getScriptLexicalStructureListContains("<global>", "module");
|
||||
verify.getScriptLexicalStructureListContains("foo", "function");
|
||||
verify.getScriptLexicalStructureListContains("bar", "function");
|
||||
verify.getScriptLexicalStructureListCount(5);
|
||||
verify.navigationBarContains("<global>", "module");
|
||||
verify.navigationBarContains("foo", "function");
|
||||
verify.navigationBarContains("bar", "function");
|
||||
verify.navigationBarCount(5);
|
||||
@ -5,7 +5,7 @@
|
||||
////}
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(2); // external module node + class + property
|
||||
verify.navigationBarCount(2); // external module node + class + property
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
////export var x: number;
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(4); // external module node + variable in module + class + property
|
||||
verify.navigationBarCount(4); // external module node + variable in module + class + property
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
////export var x: number;
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(4); // external module node + variable in module + class + property
|
||||
verify.navigationBarCount(4); // external module node + variable in module + class + property
|
||||
|
||||
@ -19,12 +19,12 @@
|
||||
//// export var z = 0;
|
||||
////}
|
||||
goTo.marker("file1");
|
||||
verify.getScriptLexicalStructureListContains("Module1", "module");
|
||||
verify.getScriptLexicalStructureListContains("x", "var");
|
||||
verify.navigationBarContains("Module1", "module");
|
||||
verify.navigationBarContains("x", "var");
|
||||
// nothing else should show up
|
||||
verify.getScriptLexicalStructureListCount(2);
|
||||
verify.navigationBarCount(2);
|
||||
|
||||
goTo.marker("file2");
|
||||
verify.getScriptLexicalStructureListContains("Module1.SubModule", "module");
|
||||
verify.getScriptLexicalStructureListContains("y", "var");
|
||||
verify.getScriptLexicalStructureListCount(2);
|
||||
verify.navigationBarContains("Module1.SubModule", "module");
|
||||
verify.navigationBarContains("y", "var");
|
||||
verify.navigationBarCount(2);
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
/// Only have two named elements.
|
||||
verify.getScriptLexicalStructureListCount(2);
|
||||
verify.navigationBarCount(2);
|
||||
|
||||
@ -8,4 +8,4 @@
|
||||
|
||||
|
||||
// The class is unnamed, so its method is not included either.
|
||||
verify.getScriptLexicalStructureListCount(2);
|
||||
verify.navigationBarCount(2);
|
||||
|
||||
@ -39,10 +39,10 @@
|
||||
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
/// We have 8 module keywords, and 4 var keywords.
|
||||
/// The declarations of A.B.C.x do not get merged, so the 4 vars are independent.
|
||||
/// The two 'A' modules, however, do get merged, so in reality we have 7 modules.
|
||||
verify.getScriptLexicalStructureListCount(11);
|
||||
verify.navigationBarCount(11);
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(9); // interface w/ 2 properties, class w/ 2 properties, 3 modules
|
||||
verify.navigationBarCount(9); // interface w/ 2 properties, class w/ 2 properties, 3 modules
|
||||
@ -6,10 +6,10 @@
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.getScriptLexicalStructureListContains("List", "class");
|
||||
verify.getScriptLexicalStructureListContains("constructor", "constructor");
|
||||
verify.getScriptLexicalStructureListContains("a", "property");
|
||||
verify.getScriptLexicalStructureListContains("b", "property");
|
||||
verify.navigationBarContains("List", "class");
|
||||
verify.navigationBarContains("constructor", "constructor");
|
||||
verify.navigationBarContains("a", "property");
|
||||
verify.navigationBarContains("b", "property");
|
||||
|
||||
// no other items
|
||||
verify.getScriptLexicalStructureListCount(4);
|
||||
verify.navigationBarCount(4);
|
||||
@ -11,7 +11,7 @@
|
||||
////}
|
||||
|
||||
test.markers().forEach(marker => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(test.markers().length);
|
||||
verify.navigationBarCount(test.markers().length);
|
||||
@ -9,7 +9,7 @@
|
||||
////}
|
||||
|
||||
test.markers().forEach(marker => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(test.markers().length);
|
||||
verify.navigationBarCount(test.markers().length);
|
||||
@ -7,7 +7,7 @@
|
||||
////}
|
||||
|
||||
test.markers().forEach(marker => {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(test.markers().length);
|
||||
verify.navigationBarCount(test.markers().length);
|
||||
@ -45,8 +45,8 @@
|
||||
|
||||
test.markers().forEach((marker) => {
|
||||
if (marker.data) {
|
||||
verify.getScriptLexicalStructureListContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
verify.navigationBarContains(marker.data.itemName, marker.data.kind, marker.fileName, marker.data.parentName);
|
||||
}
|
||||
});
|
||||
|
||||
verify.getScriptLexicalStructureListCount(23);
|
||||
verify.navigationBarCount(23);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
//// {| "itemName": "c", "kind": "const", "parentName": "" |}const c = 0;
|
||||
|
||||
test.markers().forEach(marker => {
|
||||
verify.getScriptLexicalStructureListContains(
|
||||
verify.navigationBarContains(
|
||||
marker.data.itemName,
|
||||
marker.data.kind,
|
||||
marker.fileName,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
//// {| "itemName": "c", "kind": "const", "parentName": "" |}const c = 0;
|
||||
|
||||
test.markers().forEach(marker => {
|
||||
verify.getScriptLexicalStructureListContains(
|
||||
verify.navigationBarContains(
|
||||
marker.data.itemName,
|
||||
marker.data.kind,
|
||||
marker.fileName,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user