Skip to content

Commit

Permalink
Updated dependencies. Added node 7 to travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Dec 7, 2016
1 parent 4fada62 commit b94e754
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ sudo: false
node_js:
- "4"
- "6"
- "7"
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@
"author": "Matteo Collina <[email protected]>",
"license": "MIT",
"devDependencies": {
"pre-commit": "0.0.9",
"chai": "~3.4.1",
"mocha": "~2.3.4",
"timekeeper": "~0.0.5",
"sinon": "~1.7.3"
"pre-commit": "1.1.3",
"chai": "^3.4.1",
"mocha": "^3.2.0",
"timekeeper": "^1.0.0",
"sinon": "^1.7.3"
},
"dependencies": {
"bl": "~1.0.0",
"bl": "^1.0.0",
"capitalize": "^1.0.0",
"coap-packet": "~0.1.12",
"coap-packet": "^0.1.12",
"debug": "^2.2.0",
"fastseries": "^1.7.0",
"lru-cache": "~4.0.0",
"readable-stream": "~2.0.5"
"lru-cache": "^4.0.0",
"readable-stream": "^2.2.2"
}
}
16 changes: 8 additions & 8 deletions test/end-to-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('end-to-end', function() {
req.setOption(option, format)
req.end()

server.on('request', function(req) {
server.once('request', function(req) {
expect(req.options[0].name).to.eql(option)
expect(req.options[0].value).to.eql(format)
done()
Expand All @@ -178,7 +178,7 @@ describe('end-to-end', function() {

coap.request(req).end()

server.on('request', function(req) {
server.once('request', function(req) {
expect(req.options[0].name).to.eql(option)
expect(req.options[0].value).to.eql(format)
done()
Expand All @@ -195,7 +195,7 @@ describe('end-to-end', function() {

coap.request(req).end()

server.on('request', function(req) {
server.once('request', function(req) {
expect(req.headers[option]).to.eql(format)
done()
})
Expand All @@ -206,7 +206,7 @@ describe('end-to-end', function() {
req.setOption(option, format)
req.end()

server.on('request', function(req) {
server.once('request', function(req) {
expect(req.headers[option]).to.eql(format)
done()
})
Expand All @@ -219,7 +219,7 @@ describe('end-to-end', function() {
var req = coap.request('coap://localhost:'+port)
req.end()

server.on('request', function(req, res) {
server.once('request', function(req, res) {
res.setOption('Content-Format', format)
res.end()
})
Expand All @@ -238,7 +238,7 @@ describe('end-to-end', function() {
req.setOption('Content-Format', 'application/json; charset=utf8')
req.end()

server.on('request', function(req) {
server.once('request', function(req) {
expect(req.options[0].name).to.equal('Content-Format')
expect(req.options[0].value).to.equal('application/json')
done()
Expand All @@ -251,7 +251,7 @@ describe('end-to-end', function() {
req.setOption('Max-Age', 26763)
req.end()

server.on('request', function(req) {
server.once('request', function(req) {
expect(req.options[0].name).to.equal('Max-Age')
expect(req.options[0].value).to.equal(26763)
done()
Expand All @@ -266,7 +266,7 @@ describe('end-to-end', function() {
done()
})

server.on('request', function(req, res) {
server.once('request', function(req, res) {
res.writeHead(200, {'Content-Format': 'application/json'})
res.write(JSON.stringify({}))
res.end()
Expand Down
3 changes: 2 additions & 1 deletion test/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ describe('request', function() {

it('should emit the errors in the req', function (done) {
var req = request('coap://aaa.eee:' + 1234)
req.end(new Buffer('hello world'))

req.on('error', function () {
done()
})

req.end(new Buffer('hello world'))
})

it('should error if the message is too big', function (done) {
Expand Down

0 comments on commit b94e754

Please sign in to comment.