mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
24 lines
515 B
JavaScript
24 lines
515 B
JavaScript
'use strict';
|
|
|
|
const test = require('tape');
|
|
const root = '../../';
|
|
const validate = require(root + 'lib/server/validate');
|
|
|
|
const before = require('../before');
|
|
|
|
test('validate: root: bad', (t) => {
|
|
const config = {
|
|
root: Math.random()
|
|
};
|
|
const fn = () => {
|
|
before({config}, (port, after) => {
|
|
t.fail('should not create server');
|
|
after();
|
|
t.end();
|
|
});
|
|
};
|
|
|
|
t.throws(fn, /dir should be a string/, 'should throw');
|
|
t.end();
|
|
});
|
|
|