Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky committed Sep 22, 2023
1 parent 57b6607 commit 5a8eb33
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/browser/src/core/buffer/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>[] = [call1, call2, call3]
buffer.push(...calls)
buffer.push(call1, call2, call3)
expect(buffer.getCalls('identify')).toEqual([call1, call2])
expect(buffer.getCalls('group')).toEqual([call3])
})
Expand All @@ -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([])
})
})
})
Expand Down

0 comments on commit 5a8eb33

Please sign in to comment.