Skip to content

Commit

Permalink
update dependencies & fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Nevzorov committed Sep 5, 2016
1 parent d61aad7 commit 527fc07
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"stage": 0
"presets": [
"es2015"
]
}
Empty file removed CHANGELOG.md
Empty file.
4 changes: 1 addition & 3 deletions babelhook.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
require("babel/register")({
stage: 0
});
require("babel-register");
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@
],
"dependencies": {
"aws-signature-v4": "^1.0.1",
"core-js": "^0.9.13",
"mqtt": "^1.12.0",
"websocket-stream": "^3.2.1"
"core-js": "^2.4.1",
"mqtt": "^1.14.1",
"websocket-stream": "^3.3.0"
},
"peerDependencies": {},
"optionalDependencies": {},
"devDependencies": {
"babel": "^5.4.7",
"babel": "^6.5.2",
"babel-preset-es2015": "^6.14.0",
"babel-register": "^6.14.0",
"chai": "^3.5.0",
"chai-string": "^1.2.0",
"mocha": "^2.2.1"
"mocha": "^3.0.2",
"moment": "^2.14.1"
},
"scripts": {
"compile": "babel -e -d lib/ src/",
Expand Down
4 changes: 3 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import AWSMqtt from '../src';
import MqttClient from 'mqtt/lib/client';
import chai from 'chai';
import chaiString from 'chai-string';
import moment from 'moment';
chai.use(chaiString);
const expect = chai.expect;

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

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

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

0 comments on commit 527fc07

Please sign in to comment.