mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
test: cloudcmd: update
This commit is contained in:
parent
75bf8a1275
commit
094df666f4
12 changed files with 400 additions and 240 deletions
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue