Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose strategy for dealing with color flags #46

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ internals.definition = {
alias: 'l',
description: '[run] lists all available commands on your server',
default: null
},
color: {
type: 'boolean',
description: '[*] sets output to use color',
default: null
},
'no-color': {
type: 'boolean',
description: '[*] sets output to not use color',
default: null
}
};

Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ describe('hpal', () => {
expect(result.errorOutput).to.contain('Sorry, couldn\'t find documentation for "xxx".');
});

it('fetches docs from the packages\'s master branch when in a project that does not use the package.', async (flags) => {
it('fetches docs from the packages\'s master branch when in a project that does not use the package.', { timeout: 3000 }, async (flags) => {

const mockWreck = mockWreckGet(null);
flags.onCleanup = mockWreck.cleanup;
Expand All @@ -1189,7 +1189,7 @@ describe('hpal', () => {
expect(result.errorOutput).to.contain('Sorry, couldn\'t find documentation for "xxx".');
});

it('fetches docs for the version specified by [--ver].', async (flags) => {
it('fetches docs for the version specified by [--ver].', { timeout: 3000 }, async (flags) => {

const mockWreck = mockWreckGet(null);
flags.onCleanup = mockWreck.cleanup;
Expand Down