mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-18 02:39:49 +00:00
Fix warnings when executing CLI without arguments.
Change-type: patch Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
parent
5f780a0947
commit
4a967b126b
@ -25,8 +25,8 @@ capitano.permission 'user', (done) ->
|
||||
|
||||
capitano.command
|
||||
signature: '*'
|
||||
action: ->
|
||||
capitano.execute(command: 'help')
|
||||
action: (params, options, done) ->
|
||||
capitano.execute(command: 'help', done)
|
||||
|
||||
capitano.globalOption
|
||||
signature: 'help'
|
||||
|
@ -134,4 +134,20 @@ describe('balena help', function() {
|
||||
|
||||
chai.expect(err.join('')).to.equal('');
|
||||
});
|
||||
|
||||
it('should print simple help text when no arguments present', async () => {
|
||||
const { out, err } = await runCommand('');
|
||||
|
||||
chai
|
||||
.expect(cleanOutput(out))
|
||||
.to.deep.equal(
|
||||
cleanOutput([
|
||||
SIMPLE_HELP,
|
||||
'Run `balena help --verbose` to list additional commands',
|
||||
GLOBAL_OPTIONS,
|
||||
]),
|
||||
);
|
||||
|
||||
chai.expect(err.join('')).to.equal('');
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user