mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Fourslash support for the builder property on completion lists.
This commit is contained in:
@@ -657,6 +657,18 @@ module FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyCompletionListIsBuilder(negative: boolean) {
|
||||
var completions = this.getCompletionListAtCaret();
|
||||
|
||||
if (!completions) {
|
||||
this.raiseError("Expected completion list");
|
||||
} else if ((completions && !completions.isBuilder) && !negative) {
|
||||
this.raiseError("Expected builder completion entry");
|
||||
} else if ((completions && completions.isBuilder) && negative) {
|
||||
this.raiseError("Un expected the builder completion entry");
|
||||
}
|
||||
}
|
||||
|
||||
public verifyCompletionListContains(symbol: string, text?: string, documentation?: string, kind?: string) {
|
||||
var completions = this.getCompletionListAtCaret();
|
||||
this.assertItemInCompletionList(completions.entries, symbol, text, documentation, kind);
|
||||
|
||||
@@ -172,6 +172,10 @@ module FourSlashInterface {
|
||||
FourSlash.currentTestState.verifyCompletionListIsEmpty(this.negative);
|
||||
}
|
||||
|
||||
public completionListIsBuilder() {
|
||||
FourSlash.currentTestState.verifyCompletionListIsBuilder(this.negative);
|
||||
}
|
||||
|
||||
public memberListIsEmpty() {
|
||||
FourSlash.currentTestState.verifyMemberListIsEmpty(this.negative);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user