chalk / wrap-ansi

Wordwrap a string with ANSI escape codes
MIT License
120 stars 25 forks source link

adds test coverage to wrap-ansi #4

Closed bcoe closed 9 years ago

bcoe commented 9 years ago

I've added code-coverage to wrap-ansi, to help keep me honest as I undertake the refactoring work for wrap-hard support.

screen shot 2015-10-04 at 2 23 24 pm

To enable coverage badge:

  1. visit https://coveralls.io/ and enable code-coverage for this repo.
  2. set the COVERALLS_TOKEN repo in travis.

Let me know anything you'd like changed in this pull, would love to use this as a drop in replacement in yargs.

reviewers: @dthre, @sindresorhus, @phated, @nexdrew

Qix- commented 9 years ago

FunFact you don't need COVERALLS_TOKEN for coveralls to work. Only if you use private coveralls. :dancer:

sindresorhus commented 9 years ago

FunFact you don't need COVERALLS_TOKEN for coveralls to work. Only if you use private coveralls.

@bcoe Maybe update the nyc readme about that?

Qix- commented 9 years ago

Maybe update the nyc readme about that?

It's not incorrect; it's just not required for public repositories.

sindresorhus commented 9 years ago

@Qix- I know, but that's not clear from its readme. It should specifically note it's only needed for private repos.

bcoe commented 9 years ago

@Qix- @sindresorhus I didn't realize COVERALLS_TOKEN was optional on public repos, I'll definitely update the README in nyc accordingly.

I opted to run the test in nyc --reporter=text-lcov node test.js | coveralls because it eliminates the dependence on tests having been run for the coverage script to function -- you're totally correct, we'll already have the output from the first test-run, so it could simply run the reporting step.

sindresorhus commented 9 years ago

because it eliminates the dependence on tests having been run for the coverage script to function

Ah yeah. That's a good point. Maybe update nyc docs about that too then.