chore(cloudcmd) lint

This commit is contained in:
coderaiser 2021-12-04 01:21:02 +02:00
parent bd5a8afdd5
commit efb686c332
12 changed files with 43 additions and 29 deletions

View file

@ -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();
});

View file

@ -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();
});