0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 11:17:50 +01:00
posthog/plugin-server/tests/utils/db/hub.test.ts

11 lines
435 B
TypeScript
Raw Normal View History

import { createEventsToDropByToken } from '../../../src/utils/db/hub'
describe('createEventsToDropByToken', () => {
it('should split tokens on comma', () => {
expect(createEventsToDropByToken('x:y,x:z')).toEqual(new Map([['x', ['y', 'z']]]))
})
it('handles events with duplicate separators', () => {
expect(createEventsToDropByToken('x:a,x:y:z,x:b')).toEqual(new Map([['x', ['a', 'y:z', 'b']]]))
})
})