-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: direct styled header text thru cliux.ux.info (#387)
* fix: direct syled header text thru cliux.ux.info * chore: fix copy paste errors
- Loading branch information
1 parent
cdf7396
commit 5ebe8de
Showing
2 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// tslint:disable restrict-plus-operands | ||
|
||
import * as chalk from 'chalk' | ||
import {CliUx} from '../../index' | ||
|
||
export default function styledHeader(header: string) { | ||
process.stdout.write(chalk.dim('=== ') + chalk.bold(header) + '\n') | ||
CliUx.ux.info(chalk.dim('=== ') + chalk.bold(header) + '\n') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {expect, fancy} from 'fancy-test' | ||
|
||
import {CliUx} from '../../../src' | ||
|
||
describe('styled/header', () => { | ||
fancy | ||
.stdout() | ||
.end('shows a styled header', output => { | ||
CliUx.ux.styledHeader('A styled header') | ||
expect(output.stdout).to.equal('=== A styled header\n\n') | ||
}) | ||
}) |