Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cube

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cube - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

2

package.json
{
"name": "cube",
"version": "0.0.8",
"version": "0.0.9",
"description": "A system for time series visualization using MongoDB, Node and D3.",

@@ -5,0 +5,0 @@ "keywords": ["time series", "visualization"],

@@ -15,2 +15,9 @@ var vows = require("vows"),

var obj = { type: "test"
, time: (new Date).toISOString()
, data: { foo: "bar" }
};
var arr = [obj];
var num = 42;
server.register = cube.collector.register;

@@ -30,2 +37,32 @@

suite.addBatch(test.batch({
"POST /event/put with a JSON object": {
topic: test.request({method: "POST", port: port, path: "/1.0/event/put"}, JSON.stringify(obj)),
"responds with status 400": function(response) {
assert.equal(response.statusCode, 400);
assert.deepEqual(JSON.parse(response.body), {status: 400});
}
}
}));
suite.addBatch(test.batch({
"POST /event/put with a JSON array": {
topic: test.request({method: "POST", port: port, path: "/1.0/event/put"}, JSON.stringify(arr)),
"responds with status 200": function(response) {
assert.equal(response.statusCode, 200);
assert.deepEqual(JSON.parse(response.body), {status: 200});
}
}
}));
suite.addBatch(test.batch({
"POST /event/put with a JSON number": {
topic: test.request({method: "POST", port: port, path: "/1.0/event/put"}, JSON.stringify(num)),
"responds with status 400": function(response) {
assert.equal(response.statusCode, 400);
assert.deepEqual(JSON.parse(response.body), {status: 400});
}
}
}));
suite.export(module);

@@ -70,3 +70,3 @@ var mongodb = require("mongodb"),

if (arguments.length > 1) request.write(data);
if (data && data.length > 0) request.write(data);
request.end();

@@ -73,0 +73,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc