mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 18:23:35 +00:00
test(cloudcmd) coverage
This commit is contained in:
parent
0dd475fcff
commit
ab83db8059
8 changed files with 74 additions and 153 deletions
|
|
@ -14,9 +14,17 @@ const exitPath = `${dir}/server/exit`;
|
|||
const columnsPath = `${dir}/server/columns`;
|
||||
|
||||
const validate = require(validatePath);
|
||||
const stub = require('mock-require');
|
||||
//const stub = require('mock-require');
|
||||
const clear = require('clear-module');
|
||||
|
||||
const {cache, resolve} = require;
|
||||
const stub = (name, exports) => {
|
||||
require(name);
|
||||
|
||||
const resolved = resolve(name);
|
||||
cache[resolved].exports = exports;
|
||||
};
|
||||
|
||||
test('validate: root: bad', (t) => {
|
||||
const config = {
|
||||
root: Math.random()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue