test(cloudcmd) add clear-module, mock-require

This commit is contained in:
coderaiser 2018-02-19 17:08:12 +02:00
parent 41e0d3ad8b
commit 1887b0e13c
5 changed files with 15 additions and 35 deletions

View file

@ -1,6 +1,7 @@
'use strict';
const test = require('tape');
const clean = require('clear-module');
const DIR = '../../';
const UtilPath = DIR + 'common/util';
const Util = require(UtilPath);
@ -146,7 +147,3 @@ test('util: scope', (t) => {
t.end();
});
function clean(path) {
delete require.cache[require.resolve(path)];
}