mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(cloudcmd) add clear-module, mock-require
This commit is contained in:
parent
41e0d3ad8b
commit
1887b0e13c
5 changed files with 15 additions and 35 deletions
|
|
@ -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)];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue