From 5a8eb33f1b0721e1de068f0fa4bf761d7de39bf3 Mon Sep 17 00:00:00 2001 From: Seth Silesky <5115498+silesky@users.noreply.github.com> Date: Fri, 22 Sep 2023 16:31:05 -0500 Subject: [PATCH] wip --- packages/browser/src/core/buffer/__tests__/index.test.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/browser/src/core/buffer/__tests__/index.test.ts b/packages/browser/src/core/buffer/__tests__/index.test.ts index 2fcb4ab15..640f5127b 100644 --- a/packages/browser/src/core/buffer/__tests__/index.test.ts +++ b/packages/browser/src/core/buffer/__tests__/index.test.ts @@ -43,13 +43,10 @@ describe('PreInitMethodCallBuffer', () => { describe('getCalls', () => { it('should fetch calls by name', async () => { const buffer = new PreInitMethodCallBuffer() - const call1 = new PreInitMethodCall('identify', [], jest.fn()) const call2 = new PreInitMethodCall('identify', [], jest.fn()) const call3 = new PreInitMethodCall('group', [], jest.fn()) - - const calls: PreInitMethodCall[] = [call1, call2, call3] - buffer.push(...calls) + buffer.push(call1, call2, call3) expect(buffer.getCalls('identify')).toEqual([call1, call2]) expect(buffer.getCalls('group')).toEqual([call3]) }) @@ -59,11 +56,9 @@ describe('PreInitMethodCallBuffer', () => { const call1 = new PreInitMethodCall('identify', [], jest.fn()) const call2 = new PreInitMethodCall('identify', [], jest.fn()) const call3 = new PreInitMethodCall('group', [], jest.fn()) - const buffer = new PreInitMethodCallBuffer(call1, call2, call3) buffer.clear() - expect(buffer.getCalls('identify')).toEqual([]) - expect(buffer.getCalls('group')).toEqual([]) + expect(buffer.toArray()).toEqual([]) }) }) })