mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
Fail the test if the key binding was not found.
This commit is contained in:
parent
631e0a74ee
commit
24c9b09925
|
@ -152,6 +152,10 @@ export class SpectronApplication {
|
|||
*/
|
||||
public command(command: string, capture?: boolean): Promise<any> {
|
||||
const binding = this.keybindings.find(x => x['command'] === command);
|
||||
if (!binding) {
|
||||
throw new Error(`Key binding for ${command} was not found`);
|
||||
}
|
||||
|
||||
const keys: string = binding.key;
|
||||
let keysToPress: string[] = [];
|
||||
|
||||
|
|
Loading…
Reference in a new issue