Skip to content

Commit 0b944b2

Browse files
committed
chore: extra error logs if present
1 parent 7d6ed0a commit 0b944b2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

e2e/consumer.spec.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('Consumer', function() {
7474
eventListener(consumer);
7575
});
7676

77-
afterEach(function(done) {
77+
afterEach('disconnect', function(done) {
7878
consumer.disconnect(function() {
7979
done();
8080
});
@@ -114,7 +114,9 @@ describe('Consumer', function() {
114114
consumer.assign([{topic:topic, partition:0}]);
115115
consumer.commitSync({topic:topic, partition:0, offset:1000});
116116
consumer.committed(null, 1000, function(err, committed) {
117-
t.ifError(err);
117+
if (err) {
118+
return done(err);
119+
}
118120
t.equal(committed.length, 1);
119121
t.equal(typeof committed[0], 'object', 'TopicPartition should be an object');
120122
t.deepStrictEqual(committed[0].partition, 0);

0 commit comments

Comments
 (0)