mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(cloudcmd) replacePrefix
This commit is contained in:
parent
cc30178aaa
commit
bdb7bee0b0
2 changed files with 16 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ const {
|
|||
_authenticate,
|
||||
_getPrefix,
|
||||
_authCheck,
|
||||
_replacePrefix,
|
||||
} = cloudcmd;
|
||||
|
||||
test('cloudcmd: args: no', (t) => {
|
||||
|
|
@ -70,6 +71,15 @@ test('cloudcmd: getPrefix: function', (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: replacePrefix', (t) => {
|
||||
const url = '/hello';
|
||||
const prefix = url;
|
||||
const result = _replacePrefix(url, prefix);
|
||||
|
||||
t.equal(result, '/', 'should equal');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: authCheck: success', (t) => {
|
||||
const auth = config('auth');
|
||||
const success = sinon.stub();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue