mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
feature(columns) add name-size (#139)
This commit is contained in:
parent
22142e00ba
commit
b232a936fb
8 changed files with 52 additions and 6 deletions
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue