mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
test(rest) isRootWin32
This commit is contained in:
parent
b64ed343c2
commit
d3b6a7505f
2 changed files with 10 additions and 0 deletions
|
|
@ -343,6 +343,7 @@ function copyFiles(files, processFunc, callback) {
|
|||
copy();
|
||||
}
|
||||
|
||||
module.exports._isRootWin32 = isRootWin32;
|
||||
function isRootWin32(path) {
|
||||
const isRoot = path === '/';
|
||||
const isConfig = config('root') === '/';
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ const rest = require('../../server/rest');
|
|||
const {
|
||||
_formatMsg,
|
||||
_getWin32RootMsg,
|
||||
_isRootWin32,
|
||||
} = rest;
|
||||
|
||||
test('rest: formatMsg', (t) => {
|
||||
|
|
@ -30,3 +31,11 @@ test('rest: getWin32RootMsg', (t) => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
test('rest: isRootWin32', (t) => {
|
||||
const path = '/';
|
||||
const result = _isRootWin32('/');
|
||||
|
||||
t.notOk(result, 'should equal');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue