Skip to content

Commit 5697b7d

Browse files
committed
Add test
1 parent 051356e commit 5697b7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/test/lib/logs/internal.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ describe('_INTERNAL_captureLog', () => {
259259
// Add one more to trigger flush
260260
_INTERNAL_captureLog({ level: 'info', message: 'trigger flush' }, scope);
261261

262-
expect(_INTERNAL_getLogBuffer(client)).toEqual([]);
262+
// After flushing the 100 logs, the new log starts a fresh buffer with 1 item
263+
const buffer = _INTERNAL_getLogBuffer(client);
264+
expect(buffer).toHaveLength(1);
265+
expect(buffer?.[0]?.body).toBe('trigger flush');
263266
});
264267

265268
it('does not flush logs buffer when it is empty', () => {

0 commit comments

Comments
 (0)