From d3b6a7505f32056fe28b7699a066465d29a9fcd4 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 1 Dec 2017 15:46:26 +0200 Subject: [PATCH] test(rest) isRootWin32 --- server/rest.js | 1 + test/server/rest.js | 9 +++++++++ 2 files changed, 10 insertions(+) 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(); +}); +