mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
23 lines
458 B
JavaScript
23 lines
458 B
JavaScript
'use strict';
|
|
|
|
const test = require('supertape');
|
|
const stub = require('@cloudcmd/stub');
|
|
const {runSelected} = require('./run');
|
|
|
|
test('cloudcmd: client: user menu: run', async (t) => {
|
|
const runUserMenu = stub();
|
|
const fn = stub();
|
|
const selected = [
|
|
'hello',
|
|
];
|
|
|
|
const items = {
|
|
hello: fn,
|
|
};
|
|
|
|
await runSelected(selected, items, runUserMenu);
|
|
|
|
t.calledWith(runUserMenu, [fn]);
|
|
t.end();
|
|
});
|
|
|