monitor-dog
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -172,3 +172,3 @@ 'use strict'; | ||
// Send the data using the dogstatsd client | ||
this.client.send_data(buf.join('')); | ||
this.client.send_data(new Buffer(buf.join(''))); | ||
@@ -175,0 +175,0 @@ function sanitize(s) { |
{ | ||
"name": "monitor-dog", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "A helpful wrapper for dogstatsd.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -63,7 +63,8 @@ 'use strict'; | ||
var text = 'this is the text'; | ||
var expectedFormat = '_e{' + title.length + ',' + text.length + '}:' + | ||
var expected = '_e{' + title.length + ',' + text.length + '}:' + | ||
title + '|' + text; | ||
monitor.event({ title: title, text: text }); | ||
expect(monitor.client.send_data.calledWith(expectedFormat)) | ||
.to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -84,3 +85,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -101,3 +104,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -118,3 +123,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -135,3 +142,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -152,3 +161,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -169,3 +180,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -187,3 +200,4 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.lastCall.args[0].toString()) | ||
.to.equal(expected); | ||
}); | ||
@@ -204,3 +218,5 @@ done(); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -220,3 +236,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -238,3 +256,4 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.lastCall.args[0].toString()) | ||
.to.equal(expected); | ||
}); | ||
@@ -256,3 +275,5 @@ done(); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -273,3 +294,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -289,3 +312,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -305,3 +330,5 @@ }); | ||
monitor.event(options); | ||
expect(monitor.client.send_data.calledWith(expected)).to.be.true(); | ||
expect(monitor.client.send_data.calledOnce).to.be.true(); | ||
expect(monitor.client.send_data.firstCall.args[0].toString()) | ||
.to.equal(expected); | ||
done(); | ||
@@ -308,0 +335,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
54788
1445
4