-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hey @robtweed
Simple test should be able to send message using websockets:
describe('custom message', () => {
let data;
beforeEach((done) => {
request.
post('/ajax').
send({
type: 'ewd-register',
application: 'test-app'
}).
end((err, res) => {
if (err) return done.fail(err);
data = {
type: 'test',
token: res.body.token,
params: {
text: 'Hello world'
}
};
done();
});
});
it('should be able to send message using websockets', (done) => {
const socket = io.connect('ws://localhost:8080');
socket.on('connect', () => socket.emit('ewdjs', data));
socket.on('ewdjs', (responseObj) => {
socket.disconnect();
expect(responseObj).toEqual({
type: 'test',
finished: true,
message: {
text: 'You sent: Hello world via express'
},
responseTime: jasmine.stringMatching(/^\d*ms$/)
});
done();
});
});
});QEWD configuration:
- express
- gtm
- resilientMode
QEWD configuration:
- express
- redis
- resilientMode
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

