Test using storybook
Hi guys, We are using storybook to show our components and test them.
do you provide a way to mock the communication from the BE so i could test our customized notification section?
11 Replies
@Tugy
Are you using @novu/notification-center or @novu/react
hey @Pawan Jain , im using
@novu/react
Thanks for sharing Tugy. Let me check with team. I will share examples if it is possible to mock
thank you @Pawan Jain
me and my company are during a POV with novu so your help will be much appreciated
@Tugy
I want to check if you are building custom inbox using our hooks?
hey, yes im using your hooks and building custom notifications section (this is the direction)
does all the data is communicated to the FE via http requests, or are you using sockets to transfer some of the data?
if its only http then it could be mocked via MSW, but if you're using sockets then im not sure how to test this components
@Tugy, you just advanced to level 1!
We use socket for real time communication
ok i think ive got the answers i needed 🙂
to test the component i will use MSW to add data to the component and to check its behavior correctly, but i wont test real time communication for starters
I have shared the feedback with team to add examples of testing custom inbox with any popular testing library