code review comments

This commit is contained in:
Dave Pacheco 2012-06-20 10:39:56 -07:00
parent f1996fccef
commit cc6a2d0f6e
2 changed files with 3 additions and 4 deletions

View file

@ -1003,7 +1003,6 @@ RingBuffer.prototype.destroy = function () {
RingBuffer.prototype.destroySoon = function () { RingBuffer.prototype.destroySoon = function () {
this.destroy(); this.destroy();
this.emit('close');
}; };

View file

@ -19,17 +19,17 @@ var log1 = new Logger({
test('ringbuffer', function (t) { test('ringbuffer', function (t) {
log1.info('hello'); log1.info('hello');
log1.trace('there'); log1.trace('there');
log1.error('chucklebucket'); log1.error('android');
t.equal(ringbuffer.entries.length, 2); t.equal(ringbuffer.entries.length, 2);
t.equal(ringbuffer.entries[0]['msg'], 'hello'); t.equal(ringbuffer.entries[0]['msg'], 'hello');
t.equal(ringbuffer.entries[1]['msg'], 'chucklebucket'); t.equal(ringbuffer.entries[1]['msg'], 'android');
log1.error('one'); log1.error('one');
log1.error('two'); log1.error('two');
log1.error('three'); log1.error('three');
t.equal(ringbuffer.entries.length, 5); t.equal(ringbuffer.entries.length, 5);
log1.error('four'); log1.error('four');
t.equal(ringbuffer.entries.length, 5); t.equal(ringbuffer.entries.length, 5);
t.equal(ringbuffer.entries[0]['msg'], 'chucklebucket'); t.equal(ringbuffer.entries[0]['msg'], 'android');
t.equal(ringbuffer.entries[1]['msg'], 'one'); t.equal(ringbuffer.entries[1]['msg'], 'one');
t.equal(ringbuffer.entries[2]['msg'], 'two'); t.equal(ringbuffer.entries[2]['msg'], 'two');
t.equal(ringbuffer.entries[3]['msg'], 'three'); t.equal(ringbuffer.entries[3]['msg'], 'three');