mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
test(user-menu) clear
This commit is contained in:
parent
76184c0251
commit
093966f692
3 changed files with 8 additions and 26 deletions
|
|
@ -1,10 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
const test = require('supertape');
|
||||
const rest = require('./rest');
|
||||
const io = require('./io');
|
||||
|
||||
test('cloudcmd: client: rest: replaceHash', (t) => {
|
||||
const {_replaceHash} = rest;
|
||||
test('cloudcmd: client: io: replaceHash', (t) => {
|
||||
const {_replaceHash} = io;
|
||||
const url = '/hello/####world';
|
||||
const result = _replaceHash(url);
|
||||
const expected = '/hello/%23%23%23%23world';
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const test = require('supertape');
|
||||
const stub = require('@cloudcmd/stub');
|
||||
const getUserMenu = require('./get-user-menu');
|
||||
|
||||
test('user-menu: getUserMenu', (t) => {
|
||||
|
|
@ -20,20 +19,3 @@ test('user-menu: getUserMenu', (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('user-menu: getUserMenu: no args', (t) => {
|
||||
const result = getUserMenu();
|
||||
const renameCurrent = stub();
|
||||
const DOM = {
|
||||
renameCurrent,
|
||||
};
|
||||
|
||||
const name = 'F2 - Rename file';
|
||||
|
||||
result[name]({
|
||||
DOM,
|
||||
});
|
||||
|
||||
t.ok(renameCurrent.called, 'should call renameCurrent');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const reject = wraptile(async (a) => {
|
|||
throw Error(a);
|
||||
});
|
||||
|
||||
test('cloudcmd: client: user menu: RESTful.write', async (t) => {
|
||||
test('cloudcmd: static: user menu: client: RESTful.write', async (t) => {
|
||||
const name = 'C - Create User Menu File';
|
||||
const DOM = getDOM();
|
||||
const CloudCmd = getCloudCmd();
|
||||
|
|
@ -25,7 +25,7 @@ test('cloudcmd: client: user menu: RESTful.write', async (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: client: user menu: refresh', async (t) => {
|
||||
test('cloudcmd: static: user menu: refresh', async (t) => {
|
||||
const name = 'C - Create User Menu File';
|
||||
const DOM = getDOM();
|
||||
const CloudCmd = getCloudCmd();
|
||||
|
|
@ -40,7 +40,7 @@ test('cloudcmd: client: user menu: refresh', async (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: client: user menu: setCurrentByName', async (t) => {
|
||||
test('cloudcmd: static: user menu: setCurrentByName', async (t) => {
|
||||
const name = 'C - Create User Menu File';
|
||||
const DOM = getDOM();
|
||||
const CloudCmd = getCloudCmd();
|
||||
|
|
@ -56,7 +56,7 @@ test('cloudcmd: client: user menu: setCurrentByName', async (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: client: user menu: EditFile.show', async (t) => {
|
||||
test('cloudcmd: static: user menu: EditFile.show', async (t) => {
|
||||
const name = 'C - Create User Menu File';
|
||||
const DOM = getDOM();
|
||||
const CloudCmd = getCloudCmd();
|
||||
|
|
@ -71,7 +71,7 @@ test('cloudcmd: client: user menu: EditFile.show', async (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: client: user menu: no EditFile.show', async (t) => {
|
||||
test('cloudcmd: static: user menu: no EditFile.show', async (t) => {
|
||||
const name = 'C - Create User Menu File';
|
||||
const DOM = getDOM();
|
||||
const CloudCmd = getCloudCmd();
|
||||
Loading…
Add table
Add a link
Reference in a new issue