Added goToDef count verification in fourslash facilities.
This commit is contained in:
parent
eaaf7ad468
commit
af4d7d3ff4
|
@ -1515,6 +1515,14 @@ module FourSlash {
|
|||
}
|
||||
}
|
||||
|
||||
public verifyDefinitionsCount(negative: boolean, expectedCount: number) {
|
||||
var assertFn = negative ? assert.notEqual : assert.equal;
|
||||
|
||||
var definitions = this.languageService.getDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition);
|
||||
|
||||
assertFn(definitions.length, expectedCount, this.messageAtLastKnownMarker("Definitions Count"));
|
||||
}
|
||||
|
||||
public verifyDefinitionsName(negative: boolean, expectedName: string, expectedContainerName: string) {
|
||||
this.taoInvalidReason = 'verifyDefinititionsInfo NYI';
|
||||
|
||||
|
|
|
@ -217,6 +217,10 @@ module FourSlashInterface {
|
|||
FourSlash.currentTestState.verifyQuickInfoExists(this.negative);
|
||||
}
|
||||
|
||||
public definitionCountIs(expectedCount: number) {
|
||||
FourSlash.currentTestState.verifyDefinitionsCount(this.negative, expectedCount);
|
||||
}
|
||||
|
||||
public definitionLocationExists() {
|
||||
FourSlash.currentTestState.verifyDefinitionLocationExists(this.negative);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue