mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Implement not.greaterThan for completion list
This commit is contained in:
@@ -588,14 +588,21 @@ namespace FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyCompletionListItemsCountIsGreaterThan(count: number) {
|
||||
public verifyCompletionListItemsCountIsGreaterThan(count: number, negative: boolean) {
|
||||
this.taoInvalidReason = "verifyCompletionListItemsCountIsGreaterThan NYI";
|
||||
|
||||
let completions = this.getCompletionListAtCaret();
|
||||
let itemsCount = completions.entries.length;
|
||||
|
||||
if (itemsCount <= count) {
|
||||
this.raiseError(`Expected completion list items count to be greater than ${count}, but is actually ${itemsCount}`);
|
||||
if (negative) {
|
||||
if (itemsCount > count) {
|
||||
this.raiseError(`Expected completion list items count to not be greater than ${count}, but is actually ${itemsCount}`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (itemsCount <= count) {
|
||||
this.raiseError(`Expected completion list items count to be greater than ${count}, but is actually ${itemsCount}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ module FourSlashInterface {
|
||||
// Verifies the completion list items count to be greater than the specified amount. The
|
||||
// completion list is brought up if necessary
|
||||
public completionListItemsCountIsGreaterThan(count: number) {
|
||||
FourSlash.currentTestState.verifyCompletionListItemsCountIsGreaterThan(count);
|
||||
FourSlash.currentTestState.verifyCompletionListItemsCountIsGreaterThan(count, this.negative);
|
||||
}
|
||||
|
||||
public completionListIsEmpty() {
|
||||
|
||||
Reference in New Issue
Block a user