test: cloudcmd: update

This commit is contained in:
coderaiser 2023-12-04 20:04:39 +02:00
parent 75bf8a1275
commit 094df666f4
12 changed files with 400 additions and 240 deletions

View file

@ -105,6 +105,6 @@ test('config: middle: no', (t) => {
middle(req, res, next);
t.ok(next.calledWith(), 'should call next');
t.calledWithNoArgs(next, 'should call next');
t.end();
});

View file

@ -16,6 +16,6 @@ test('cloudcmd: rest: info', (t) => {
process.memoryUsage = memoryUsage;
t.ok(_memoryUsage.calledWith(), 'should call memoryUsage');
t.calledWithNoArgs(_memoryUsage, 'should call memoryUsage');
t.end();
});

View file

@ -99,8 +99,11 @@ function sendDefaultMenu(res) {
async function transpile(source) {
return await tryToCatch(putout, source, {
rules: {
'nodejs/convert-esm-to-commonjs': 'on',
},
plugins: [
'convert-esm-to-commonjs',
'nodejs',
'strict-mode',
'cloudcmd',
],

View file

@ -44,7 +44,7 @@ test('validate: root: /', (t) => {
const fn = stub();
validate.root('/', fn);
t.notOk(fn.called, 'should not call fn');
t.notCalled(fn, 'should not call fn');
t.end();
});
@ -116,7 +116,7 @@ test('validate: columns', (t) => {
stopAll();
t.notOk(fn.called, 'should not call exit');
t.notCalled(fn, 'should not call exit');
t.end();
});