Skip to content

Commit

Permalink
Use console.log instead of console.error
Browse files Browse the repository at this point in the history
Finding linked packages is an expected outcome and
should not be considered an error. Logging with console.log
instead of console.error therefor seems more appropriate.
  • Loading branch information
c-eliasson committed Oct 19, 2017
1 parent 3d2de02 commit 9b5db27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function cb (pkgName, foundPath) {
function log () {
var header = 'Some npm-link\'ed packaged were found:'

console.error(header + '\n' + list.join('\n') + '\n')
console.log(header + '\n' + list.join('\n') + '\n')
process.exitCode = 1
}

Expand Down
8 changes: 4 additions & 4 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ describe('simple project', function () {
})
})

it('should make cmd.js log an error', function (done) {
it('should make cmd.js log', function (done) {
exec(CMD + pathToProject, function (err, stdout, stderr) {
if (err) assert.ok(err)
assert.ok(/Some npm-link'ed packaged were found:/.test(stderr))
assert.ok(/Some npm-link'ed packaged were found:/.test(stdout))

done()
})
Expand Down Expand Up @@ -107,11 +107,11 @@ describe('nested project', function () {
setTimeout(done, DELAY)
})

it('should make cmd.js throw an error', function (done) {
it('should make cmd.js log', function (done) {
exec(CMD + pathToProject, function (err, stdout, stderr) {
if (err) assert.ok(err)

assert.ok(/Some npm-link'ed packaged were found:/.test(stderr))
assert.ok(/Some npm-link'ed packaged were found:/.test(stdout))

done()
})
Expand Down

0 comments on commit 9b5db27

Please sign in to comment.