mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test: cloudcmd: client: key
This commit is contained in:
parent
f903c5c9c5
commit
cfa0b5e382
2 changed files with 4 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ const Buffer = require('../dom/buffer');
|
|||
const Events = require('../dom/events');
|
||||
const KEY = require('./key');
|
||||
|
||||
const vim = require('./vim');
|
||||
const _vim = require('./vim');
|
||||
const setCurrentByChar = require('./set-current-by-char');
|
||||
const {createBinder} = require('./binder');
|
||||
|
||||
|
|
@ -60,6 +60,7 @@ async function listener(event, overrides = {}) {
|
|||
config = CloudCmd.config,
|
||||
_config = CloudCmd._config,
|
||||
switchKey = _switchKey,
|
||||
vim = _vim,
|
||||
} = overrides;
|
||||
|
||||
const {keyCode} = event;
|
||||
|
|
@ -97,7 +98,7 @@ async function listener(event, overrides = {}) {
|
|||
return;
|
||||
|
||||
if (isVim)
|
||||
vim(char, event);
|
||||
await vim(char, event);
|
||||
}
|
||||
|
||||
function getSymbol(shift, keyCode) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const {stub} = supertape;
|
|||
global.DOM = getDOM();
|
||||
global.CloudCmd = getCloudCmd();
|
||||
|
||||
test.skip('cloudcmd: client: key: enable vim', async (t) => {
|
||||
test('cloudcmd: client: key: enable vim', async (t) => {
|
||||
const vim = stub();
|
||||
const config = stub().returns(true);
|
||||
const _config = stub();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue