Skip to content

Commit 868cd9f

Browse files
author
cloudhead
committed
ability to print messages without a nl
1 parent b851ffe commit 868cd9f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bin/vows

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function runSuites(suites, callback) {
260260
(function run(suites, callback) {
261261
var suite = suites.shift();
262262
if (suite) {
263-
msg('runner', "running", suite.subject);
263+
msg('runner', "running", suite.subject + ' ', true);
264264
suite.run(options, function (result) {
265265
Object.keys(result).forEach(function (k) {
266266
results[k] += result[k];
@@ -273,12 +273,12 @@ function runSuites(suites, callback) {
273273
})(suites, callback);
274274
}
275275

276-
function msg(cmd, subject, str) {
276+
function msg(cmd, subject, str, p) {
277277
if (options.verbose) {
278-
sys.puts( stylize('vows ', 'green')
279-
+ stylize(cmd, 'bold')
280-
+ ' ' + subject + ' '
281-
+ (str ? (str[0] === '/' ? str : inspect(str)) : '')
282-
);
278+
sys[p ? 'print' : 'puts']( stylize('vows ', 'green')
279+
+ stylize(cmd, 'bold')
280+
+ ' ' + subject + ' '
281+
+ (str ? (typeof(str) === 'string' ? str : inspect(str)) : '')
282+
);
283283
}
284284
}

0 commit comments

Comments
 (0)