Skip to content

Commit f887206

Browse files
author
cloudhead
committed
(fix) output the subjects without need for nextTick
1 parent 1cb886c commit f887206

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/vows.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ function addVows(tests) {
281281

282282
function puts() {
283283
var args = Array.prototype.slice.call(arguments);
284-
if (vows.promises[suites - 1].listeners('finish').length > 0) {
284+
if (vows.promises.length && vows.promises[suites - 1].listeners('finish').length > 0) {
285285
buffer.push(args.join('\n'));
286286
} else {
287-
sys.puts.apply(null, args);
287+
sys.puts.apply(null, args);
288288
}
289289
}
290290

@@ -388,11 +388,10 @@ vows.describe = function (subject) {
388388
broken = 0, errored = 0;
389389
buffer = [], suites = 0;
390390

391-
process.nextTick(function () {
392-
if (!vows.options.brief) {
393-
puts('\n' + stylize(subject, 'underline') + '\n');
394-
}
395-
});
391+
if (!vows.options.brief) {
392+
puts('\n' + stylize(subject, 'underline') + '\n');
393+
}
394+
396395
return new(events.EventEmitter)().addListener('newListener', function (e, listener) {
397396
var that = this;
398397
if (e === 'end') {

0 commit comments

Comments
 (0)