Skip to content

Commit

Permalink
test: add socketIOSecret selector test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kacper-RF committed Oct 27, 2023
1 parent 6d8131d commit 130469a
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,17 @@ describe('communitiesSelectors', () => {
const peersList = connectionSelectors.peerList(store.getState())
expect(peersList).toMatchObject(expectedArray)
})

it('select socketIOSecret', async () => {
const secret = 'secret'
const socketIOSecret = connectionSelectors.socketIOSecret(store.getState())

expect(socketIOSecret).toBeNull()

store.dispatch(connectionActions.setSocketIOSecret(secret))

const socketIOSecret2 = connectionSelectors.socketIOSecret(store.getState())

expect(socketIOSecret2).toEqual(secret)
})
})

0 comments on commit 130469a

Please sign in to comment.