diff --git a/server/rest.js b/server/rest.js index 92301063..b14294b1 100644 --- a/server/rest.js +++ b/server/rest.js @@ -343,6 +343,7 @@ function copyFiles(files, processFunc, callback) { copy(); } +module.exports._isRootWin32 = isRootWin32; function isRootWin32(path) { const isRoot = path === '/'; const isConfig = config('root') === '/'; diff --git a/test/server/rest.js b/test/server/rest.js index 2924f752..449442a1 100644 --- a/test/server/rest.js +++ b/test/server/rest.js @@ -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(); +}); +