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

@ -6,7 +6,7 @@ const autoGlobals = require('auto-globals');
const test = autoGlobals(require('supertape'));
const stub = require('@cloudcmd/stub');
const mockRequire = require('mock-require');
const {reRequire} = mockRequire;
const {reRequire, stopAll} = mockRequire;
test('cloudcmd: client: view: initConfig', (t) => {
let config;
@ -78,6 +78,8 @@ test('cloudcmd: client: view: html', (t) => {
const [first] = open.args;
const [arg] = first;
stopAll();
t.deepEqual(first, [arg, _Config]);
t.end();
});
@ -101,6 +103,8 @@ test('cloudcmd: client: view: createIframe', (t) => {
width: '100%',
};
stopAll();
t.calledWith(createElement, ['iframe', expected]);
t.end();
});
@ -118,6 +122,8 @@ test('cloudcmd: client: view: createIframe: returns', (t) => {
const src = '/hello.html';
const result = _createIframe(src);
stopAll();
t.equal(result, el);
t.end();
});