提交 b31e4ab8 编写于 作者: S Shobhit Chittora

Extends test for source: filter

上级 7180828f
......@@ -258,6 +258,19 @@ suite('Keybindings Editor Model test', () => {
});
});
test('filter by source: filter', () => {
const command = 'a' + uuid.generateUuid();
const expected = aResolvedKeybindingItem({ command, firstPart: { keyCode: KeyCode.Escape }, when: 'context1 && context2', isDefault: false });
prepareKeybindingService(expected);
return testObject.resolve({}).then(() => {
let actual = testObject.fetch('source: user').filter(element => element.keybindingItem.command === command)[0];
assert.ok(actual);
actual = testObject.fetch('source: default').filter(element => element.keybindingItem.command === command)[0];
assert.ok(actual);
});
});
test('filter by when context', () => {
const command = 'a' + uuid.generateUuid();
const expected = aResolvedKeybindingItem({ command, firstPart: { keyCode: KeyCode.Escape }, when: 'whenContext1 && whenContext2', isDefault: false });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册