mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
85015881d0
commit
3172759ca0
6 changed files with 10 additions and 0 deletions
|
|
@ -102,6 +102,7 @@ test('config: middle: no', (t) => {
|
|||
};
|
||||
|
||||
middle(req, res, next);
|
||||
|
||||
t.ok(next.calledWith(), 'should call next');
|
||||
t.end();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ test('rest: isRootAll', (t) => {
|
|||
|
||||
test('rest: onPUT: no args', async (t) => {
|
||||
const [e] = await tryToCatch(_onPUT, {});
|
||||
|
||||
t.equal(e.message, 'name should be a string!', 'should throw when no args');
|
||||
t.end();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ test('validate: root: bad', (t) => {
|
|||
};
|
||||
|
||||
const [e] = tryCatch(cloudcmd, {config});
|
||||
|
||||
t.equal(e.message, 'dir should be a string', 'should throw');
|
||||
t.end();
|
||||
});
|
||||
|
|
@ -64,6 +65,7 @@ test('validate: root: stat', (t) => {
|
|||
fs.statSync = statSync;
|
||||
|
||||
mockRequire.stop(exitPath);
|
||||
|
||||
t.calledWith(fn, [msg, error], 'should call fn');
|
||||
t.end();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue