mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
21 lines
431 B
JavaScript
21 lines
431 B
JavaScript
import test from 'supertape';
|
|
import stub from '@cloudcmd/stub';
|
|
import {runSelected} from './run.js';
|
|
|
|
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();
|
|
});
|
|
|