Skip to content

Commit

Permalink
add test for args._luminoEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfulton9 committed Oct 30, 2023
1 parent 7dcb9d9 commit ce17879
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/commands/tests/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,13 @@ describe('@lumino/commands', () => {
describe('#processKeydownEvent()', () => {
it('should dispatch on a correct keyboard event', () => {
let called = false;
let _luminoEventType;
let _luminoEventKeys;
registry.addCommand('test', {
execute: () => {
execute: (args) => {
called = true;
_luminoEventType = (args._luminoEvent as ReadonlyJSONObject).type
_luminoEventKeys = (args._luminoEvent as ReadonlyJSONObject).keys
}
});
registry.addKeyBinding({
Expand All @@ -718,6 +722,8 @@ describe('@lumino/commands', () => {
})
);
expect(called).to.equal(true);
expect(_luminoEventType).to.equal('keybinding')
expect(_luminoEventKeys).to.contain('Ctrl ;')
});

it('should not dispatch on a suppressed node', () => {
Expand Down

0 comments on commit ce17879

Please sign in to comment.