feature(columns) add name-size (#139)

This commit is contained in:
coderaiser 2018-03-14 11:50:44 +02:00
parent 22142e00ba
commit b232a936fb
8 changed files with 52 additions and 6 deletions

View file

@ -11,6 +11,7 @@ const dir = '../..';
const validatePath = `${dir}/server/validate`;
const exitPath = `${dir}/server/exit`;
const columnsPath = `${dir}/server/columns`;
const validate = require(validatePath);
const stub = require('mock-require');
@ -126,11 +127,16 @@ test('validate: columns: wrong', (t) => {
const fn = sinon.stub();
clean();
clear(columnsPath);
require(exitPath);
stub(exitPath, fn);
stub(columnsPath, {
'name-size-date': '',
'name-size': '',
});
const {columns} = require(validatePath);
const msg = 'cloudcmd --columns: could be "name-size-date" or "name-size-date-owner-mode"';
const msg = 'cloudcmd --columns: can be only one of: "name-size-date", "name-size"';
columns('hello');