lml-main
Version:
This is now a mono repository published into many standalone packages.
17 lines (14 loc) • 586 B
text/typescript
import { random } from 'faker'
import { initialPusherMetadataState, pusherMetadataReducer } from '../reducers'
import { setMetadata } from '../actions'
import { mockMetadata } from '../mocks'
import { } from '@lml/ts-utils'
describe('Pusher metadata reducer', () => {
it('should set pusher metadata', () => {
const metadata = mockMetadata()
const channel = 'TEST_CHANEL'
const action = setMetadata(channel, metadata)
const state = pusherMetadataReducer(initialPusherMetadataState, action)
expect(state[channel]).toEqual(metadata)
})
})