mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) update dependencies
This commit is contained in:
parent
4c7f8cc6b6
commit
c719e37cc1
5 changed files with 37 additions and 21 deletions
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const tryCatch = require('try-catch');
|
||||
|
||||
const DIR = __dirname + '/../../';
|
||||
const COMMONDIR = DIR + 'common/';
|
||||
|
|
@ -181,16 +182,18 @@ test('cloudfunc: getHeaderField', (t) => {
|
|||
});
|
||||
|
||||
test('cloudfunc: getPathLink: no url', (t) => {
|
||||
t.throws(CloudFunc.getPathLink, 'should throw when no url');
|
||||
const [error] = tryCatch(CloudFunc.getPathLink);
|
||||
|
||||
t.ok(error, 'should throw when no url');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('cloudfunc: getPathLink: no template', (t) => {
|
||||
const url = 'http://abc.com';
|
||||
const prefix = '';
|
||||
const fn = () => CloudFunc.getPathLink(url, prefix);
|
||||
const [error] = tryCatch(CloudFunc.getPathLink, url, prefix);
|
||||
|
||||
t.throws(fn, 'should throw when no template');
|
||||
t.ok(error, 'should throw when no template');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue