mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
20 lines
411 B
JavaScript
20 lines
411 B
JavaScript
'use strict';
|
|
|
|
const {test, stub} = require('supertape');
|
|
|
|
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();
|
|
});
|