Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-10-24 11:15:18 +0400
committerisaacs <i@izs.me>2013-10-24 11:15:18 +0400
commit4989b4d4f23272bdf6e56b774760c634b7236d4c (patch)
treeb65164a21c32adc5e66f27e2e2cce0f1183d9276 /node_modules/npmlog
parentadad658419ad1f7f9f636a0639a83b4e01cde962 (diff)
npmlog@0.0.6
Diffstat (limited to 'node_modules/npmlog')
-rw-r--r--node_modules/npmlog/package.json4
-rw-r--r--node_modules/npmlog/test/basic.js265
2 files changed, 18 insertions, 251 deletions
diff --git a/node_modules/npmlog/package.json b/node_modules/npmlog/package.json
index ccfc2c128..28b444cca 100644
--- a/node_modules/npmlog/package.json
+++ b/node_modules/npmlog/package.json
@@ -6,7 +6,7 @@
},
"name": "npmlog",
"description": "logger for npm",
- "version": "0.0.5",
+ "version": "0.0.6",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/npmlog.git"
@@ -27,6 +27,6 @@
"bugs": {
"url": "https://github.com/isaacs/npmlog/issues"
},
- "_id": "npmlog@0.0.5",
+ "_id": "npmlog@0.0.6",
"_from": "npmlog@latest"
}
diff --git a/node_modules/npmlog/test/basic.js b/node_modules/npmlog/test/basic.js
index 80c8c3184..1afcabd1c 100644
--- a/node_modules/npmlog/test/basic.js
+++ b/node_modules/npmlog/test/basic.js
@@ -9,254 +9,21 @@ var logPrefixEvents = []
var util = require('util')
var resultExpect =
-[ '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[7m',
- 'sill',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'silly prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[34m',
- '\u001b[40m',
- 'verb',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'verbose prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[32m',
- '\u001b[7m',
- 'info',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'info prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[32m',
- 'http',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'http prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[30m',
- '\u001b[41m',
- 'WARN',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[33m',
- 'warn prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'error prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[32m',
- '\u001b[7m',
- 'info',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'info prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[32m',
- 'http',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'http prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[30m',
- '\u001b[41m',
- 'WARN',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'warn prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- 'error prefix',
- '\u001b[0m',
- ' x = {"foo":{"bar":"baz"}}\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- '404',
- '\u001b[0m',
- ' This is a longer\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- '404',
- '\u001b[0m',
- ' message, with some details\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- '404',
- '\u001b[0m',
- ' and maybe a stack.\n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[31m',
- '\u001b[40m',
- 'ERR!',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u001b[35m',
- '404',
- '\u001b[0m',
- ' \n',
- '\u001b[0m',
- '\u001b[37m',
- '\u001b[40m',
- 'npm',
- '\u001b[0m',
- ' ',
- '\u001b[0m',
- '\u0007',
- 'noise',
- '\u001b[0m',
- '\u001b[35m',
- '',
- '\u001b[0m',
- ' LOUD NOISES\n',
+[ '\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[7msill\u001b[0m \u001b[0m\u001b[35msilly prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[34m\u001b[40mverb\u001b[0m \u001b[0m\u001b[35mverbose prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32minfo\u001b[0m \u001b[0m\u001b[35minfo prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32m\u001b[40mhttp\u001b[0m \u001b[0m\u001b[35mhttp prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[30m\u001b[43mWARN\u001b[0m \u001b[0m\u001b[35mwarn prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35merror prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32minfo\u001b[0m \u001b[0m\u001b[35minfo prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32m\u001b[40mhttp\u001b[0m \u001b[0m\u001b[35mhttp prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[30m\u001b[43mWARN\u001b[0m \u001b[0m\u001b[35mwarn prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35merror prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m This is a longer\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m message, with some details\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m and maybe a stack.\n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m \n',
+ '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u0007noise\u001b[0m\u001b[35m\u001b[0m LOUD NOISES\n',
'\u001b[0m' ]
var logPrefixEventsExpect =
@@ -451,7 +218,7 @@ tap.test('basic', function (t) {
log.addLevel('noise', 10000, {beep: true})
log.noise(false, 'LOUD NOISES')
- t.deepEqual(result, resultExpect, 'result')
+ t.deepEqual(result.join('').trim(), resultExpect.join('').trim(), 'result')
t.deepEqual(log.record, logEventsExpect, 'record')
t.deepEqual(logEvents, logEventsExpect, 'logEvents')
t.deepEqual(logInfoEvents, logInfoEventsExpect, 'logInfoEvents')