mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
17 lines
388 B
JavaScript
17 lines
388 B
JavaScript
import {test, stub} from 'supertape';
|
|
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();
|
|
});
|