test message check for identifier set

pull/1151/head
Audric Ackermann 5 years ago
parent 5cec07ef16
commit d1da0e581e
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -90,4 +90,9 @@ describe('DeviceLinkMessage', () => {
expect(linkRequestMessage.ttl()).to.equal(2 * 60 * 1000);
expect(linkGrantMessage.ttl()).to.equal(2 * 60 * 1000);
});
it('has an identifier', () => {
expect(linkRequestMessage.identifier).to.not.equal(null, 'identifier cannot be null');
expect(linkRequestMessage.identifier).to.not.equal(undefined, 'identifier cannot be undefined');
});
});

@ -21,4 +21,9 @@ describe('DeviceUnlinkMessage', () => {
it('ttl of 4 days', () => {
expect(message.ttl()).to.equal(4 * 24 * 60 * 60 * 1000);
});
it('has an identifier', () => {
expect(message.identifier).to.not.equal(null, 'identifier cannot be null');
expect(message.identifier).to.not.equal(undefined, 'identifier cannot be undefined');
});
});

@ -30,4 +30,9 @@ describe('EndSessionMessage', () => {
it('ttl of 4 days', () => {
expect(message.ttl()).to.equal(4 * 24 * 60 * 60 * 1000);
});
it('has an identifier', () => {
expect(message.identifier).to.not.equal(null, 'identifier cannot be null');
expect(message.identifier).to.not.equal(undefined, 'identifier cannot be undefined');
});
});

@ -32,4 +32,9 @@ describe('GroupInvitationMessage', () => {
it('ttl of 1 day', () => {
expect(message.ttl()).to.equal(24 * 60 * 60 * 1000);
});
it('has an identifier', () => {
expect(message.identifier).to.not.equal(null, 'identifier cannot be null');
expect(message.identifier).to.not.equal(undefined, 'identifier cannot be undefined');
});
});

@ -42,4 +42,9 @@ describe('ReceiptMessage', () => {
expect(readMessage.ttl()).to.equal(24 * 60 * 60 * 1000);
expect(deliveryMessage.ttl()).to.equal(24 * 60 * 60 * 1000);
});
it('has an identifier', () => {
expect(readMessage.identifier).to.not.equal(null, 'identifier cannot be null');
expect(readMessage.identifier).to.not.equal(undefined, 'identifier cannot be undefined');
});
});

@ -21,4 +21,9 @@ describe('SessionEstablishedMessage', () => {
it('ttl of 5 minutes', () => {
expect(message.ttl()).to.equal(5 * 60 * 1000);
});
it('has an identifier', () => {
expect(message.identifier).to.not.equal(null, 'identifier cannot be null');
expect(message.identifier).to.not.equal(undefined, 'identifier cannot be undefined');
});
});

@ -29,4 +29,9 @@ describe('SessionResetMessage', () => {
it('ttl of 4 days', () => {
expect(message.ttl()).to.equal(4 * 24 * 60 * 60 * 1000);
});
it('has an identifier', () => {
expect(message.identifier).to.not.equal(null, 'identifier cannot be null');
expect(message.identifier).to.not.equal(undefined, 'identifier cannot be undefined');
});
});

@ -69,4 +69,13 @@ describe('TypingMessage', () => {
});
expect(message.ttl()).to.equal(60 * 1000);
});
it('has an identifier', () => {
const message = new TypingMessage({
timestamp: Date.now(),
isTyping: true,
});
expect(message.identifier).to.not.equal(null, 'identifier cannot be null');
expect(message.identifier).to.not.equal(undefined, 'identifier cannot be undefined');
});
});

Loading…
Cancel
Save