Bus-expectation Library
Overview
Testing library to expect some messages in a queue or topic in stomp protocol.
Currently, there are two API flavours:
- BusExpectation
- BusSpy
BusSpy
var doSendTestMsg;var busSpy = ; //do whatever actions will cause expected message //expecting the stomp message to have header chucha === 'jija' ; { //exercise functions receive a callback to let know the BusSpy when exercise has finished. var client = settingsstomp; client; client;};
See src/component-tests/busSpy.component.test.js for a complete list of examples.
BusExpectation
var busExpectation = ;busExpectation ;busExpectation;
See usage in src/component-tests/busExpectation.test.js
Optionally you can pass connection settings through environtment variables:
export BUS_EXPECTATION_PORT=61613export BUS_EXPECTATION_HOST=localhostexport BUS_EXPECTATION_DEBUG=falseexport BUS_EXPECTATION_USER=<username>export BUS_EXPECTATION_PASSWORD=<password>
How to use it
Quick help
- Install modules
$ npm install
- Check tests
$ ./tests.sh