mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
bd5a8afdd5
commit
efb686c332
12 changed files with 43 additions and 29 deletions
|
|
@ -4,7 +4,7 @@ const test = require('supertape');
|
|||
const stub = require('@cloudcmd/stub');
|
||||
const mockRequire = require('mock-require');
|
||||
|
||||
const {reRequire} = mockRequire;
|
||||
const {reRequire, stopAll} = mockRequire;
|
||||
|
||||
test('client: dom: io', (t) => {
|
||||
const sendRequest = stub();
|
||||
|
|
@ -22,6 +22,8 @@ test('client: dom: io', (t) => {
|
|||
url: '/fs/hello?dir',
|
||||
};
|
||||
|
||||
stopAll();
|
||||
|
||||
t.calledWith(sendRequest, [expected]);
|
||||
t.end();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const test = require('supertape');
|
|||
const stub = require('@cloudcmd/stub');
|
||||
const mockRequire = require('mock-require');
|
||||
|
||||
const {reRequire} = mockRequire;
|
||||
const {reRequire, stopAll} = mockRequire;
|
||||
|
||||
test('cloudcmd: client: dom: renameCurrent: isCurrentFile', async (t) => {
|
||||
const current = {};
|
||||
|
|
@ -18,6 +18,8 @@ test('cloudcmd: client: dom: renameCurrent: isCurrentFile', async (t) => {
|
|||
const renameCurrent = reRequire('./rename-current');
|
||||
await renameCurrent(current);
|
||||
|
||||
stopAll();
|
||||
|
||||
t.calledWith(isCurrentFile, [current], 'should call isCurrentFile');
|
||||
t.end();
|
||||
});
|
||||
|
|
@ -55,6 +57,8 @@ test('cloudcmd: client: dom: renameCurrent: file exist', async (t) => {
|
|||
const expected = 'Directory "hello" already exists. Proceed?';
|
||||
global.CloudCmd = CloudCmd;
|
||||
|
||||
stopAll();
|
||||
|
||||
t.calledWith(confirm, [expected], 'should call confirm');
|
||||
t.end();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue