Skip to content

Commit

Permalink
Replaces assert.equale with assert.strictEqual in tests and updates a…
Browse files Browse the repository at this point in the history
…ddon version to 1.4.0
  • Loading branch information
davideferre committed Jan 22, 2022
1 parent 87397b2 commit 128d5ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-mqttjs",
"version": "1.3.1",
"version": "1.4.0",
"description": "Ember async service for connecting to mqtt broker through mqtt.js library.",
"keywords": [
"mqtt",
Expand Down
14 changes: 7 additions & 7 deletions tests/unit/services/mqtt-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ module('Unit | Service | mqtt', function (hooks) {
try {
await service.connect(mqttHost);
let _oGranted = await service.subscribe(mqttTopic);
assert.equal(_oGranted[0].topic, mqttTopic);
assert.strictEqual(_oGranted[0].topic, mqttTopic);
} catch {
assert.ok(false);
} finally {
Expand Down Expand Up @@ -174,7 +174,7 @@ module('Unit | Service | mqtt', function (hooks) {
await service.subscribe(mqttTopic);
assert.ok(false);
} catch (oError) {
assert.equal(oError.message, 'Error');
assert.strictEqual(oError.message, 'Error');
} finally {
done();
}
Expand Down Expand Up @@ -217,14 +217,14 @@ module('Unit | Service | mqtt', function (hooks) {
try {
await service.connect(mqttHost);
let _oGranted = await service.subscribe(mqttTopic);
assert.equal(_oGranted[0].topic, mqttTopic);
assert.strictEqual(_oGranted[0].topic, mqttTopic);
} catch {
assert.ok(false);
}
try {
service.on('mqtt-message', (sTopic, sMessage) => {
assert.equal(sTopic, mqttTopic);
assert.equal(sMessage, mqttMessage);
assert.strictEqual(sTopic, mqttTopic);
assert.strictEqual(sMessage, mqttMessage);
});
await service.publish(mqttTopic, mqttMessage);
} catch {
Expand Down Expand Up @@ -267,15 +267,15 @@ module('Unit | Service | mqtt', function (hooks) {
try {
await service.connect(mqttHost);
let _oGranted = await service.subscribe(mqttTopic);
assert.equal(_oGranted[0].topic, mqttTopic);
assert.strictEqual(_oGranted[0].topic, mqttTopic);
} catch {
assert.ok(false);
}
try {
await service.publish(mqttTopic, mqttMessage);
assert.ok(false);
} catch (oError) {
assert.equal(oError.message, 'Error');
assert.strictEqual(oError.message, 'Error');
} finally {
done();
}
Expand Down

0 comments on commit 128d5ee

Please sign in to comment.