-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Mocking MQTT.js in system tests via Playwright #1962
-
I've written a blog post to demonstrate how to mock MQTT.js via Playwright in system tests.
https://camillovisini.com/coding/mocking-mqtt-with-playwright
Hope it's helpful for somebody
See also the repo with the full code: https://github.com/visini/mqtt-playwright-example
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
Hi @visini and thanks for your article. It could be my opinion but I don't think having a broker adds so much overhead at all, I suggest you to give a look for example to aedes-cli package that's a package I used on mqttjs for browser e2e tests :)
See: https://github.com/mqttjs/MQTT.js/blob/main/web-test-runner.config.mjs
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
@robertsLando fascinating, thank you – I will definitely have a look, this looks straightforward indeed 👍
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1