Skip to content

Commit cfa0b5e

Browse files
committed
test: cloudcmd: client: key
1 parent f903c5c commit cfa0b5e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

client/key/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const Buffer = require('../dom/buffer');
88
const Events = require('../dom/events');
99
const KEY = require('./key');
1010

11-
const vim = require('./vim');
11+
const _vim = require('./vim');
1212
const setCurrentByChar = require('./set-current-by-char');
1313
const {createBinder} = require('./binder');
1414

@@ -60,6 +60,7 @@ async function listener(event, overrides = {}) {
6060
config = CloudCmd.config,
6161
_config = CloudCmd._config,
6262
switchKey = _switchKey,
63+
vim = _vim,
6364
} = overrides;
6465

6566
const {keyCode} = event;
@@ -97,7 +98,7 @@ async function listener(event, overrides = {}) {
9798
return;
9899

99100
if (isVim)
100-
vim(char, event);
101+
await vim(char, event);
101102
}
102103

103104
function getSymbol(shift, keyCode) {

client/key/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const {stub} = supertape;
1515
global.DOM = getDOM();
1616
global.CloudCmd = getCloudCmd();
1717

18-
test.skip('cloudcmd: client: key: enable vim', async (t) => {
18+
test('cloudcmd: client: key: enable vim', async (t) => {
1919
const vim = stub();
2020
const config = stub().returns(true);
2121
const _config = stub();

0 commit comments

Comments
 (0)