Skip to content

Commit 527fc07

Browse files
author
Dmitriy Nevzorov
committed
update dependencies & fix tests
1 parent d61aad7 commit 527fc07

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

.babelrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"stage": 0
2+
"presets": [
3+
"es2015"
4+
]
35
}

CHANGELOG.md

Whitespace-only changes.

babelhook.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
require("babel/register")({
2-
stage: 0
3-
});
1+
require("babel-register");

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,20 @@
1919
],
2020
"dependencies": {
2121
"aws-signature-v4": "^1.0.1",
22-
"core-js": "^0.9.13",
23-
"mqtt": "^1.12.0",
24-
"websocket-stream": "^3.2.1"
22+
"core-js": "^2.4.1",
23+
"mqtt": "^1.14.1",
24+
"websocket-stream": "^3.3.0"
2525
},
2626
"peerDependencies": {},
2727
"optionalDependencies": {},
2828
"devDependencies": {
29-
"babel": "^5.4.7",
29+
"babel": "^6.5.2",
30+
"babel-preset-es2015": "^6.14.0",
31+
"babel-register": "^6.14.0",
3032
"chai": "^3.5.0",
3133
"chai-string": "^1.2.0",
32-
"mocha": "^2.2.1"
34+
"mocha": "^3.0.2",
35+
"moment": "^2.14.1"
3336
},
3437
"scripts": {
3538
"compile": "babel -e -d lib/ src/",

test/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import AWSMqtt from '../src';
33
import MqttClient from 'mqtt/lib/client';
44
import chai from 'chai';
55
import chaiString from 'chai-string';
6+
import moment from 'moment';
67
chai.use(chaiString);
78
const expect = chai.expect;
89

@@ -28,7 +29,8 @@ describe("AWSMqtt", () => {
2829
});
2930

3031
it("should contain correct amz credentials", () => {
31-
expect(awsMqttClient.stream.socket.url).to.contain('X-Amz-Credential=ASIAJKQ5TEVEKOEAUXCQ%2F20160711%2Feu-west-1%2Fiotdevicegateway%2Faws4_request');
32+
const date = moment().format('YYYYMMDD');
33+
expect(awsMqttClient.stream.socket.url).to.contain(`X-Amz-Credential=ASIAJKQ5TEVEKOEAUXCQ%2F${date}%2Feu-west-1%2Fiotdevicegateway%2Faws4_request`);
3234
});
3335

3436
it("should contain security token", () => {

0 commit comments

Comments
 (0)