New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

beanstalkd

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beanstalkd - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

4

lib/client.js

@@ -109,3 +109,5 @@ 'use strict';

let data = args.pop();
args.push(data.length);
let b = new Buffer(data);
args.push(b.length);
args.push(data);

@@ -112,0 +114,0 @@ }

{
"name": "beanstalkd",
"version": "2.2.1",
"version": "2.2.2",
"description": "A beanstalkd client for Node.js with promises",

@@ -5,0 +5,0 @@ "main": "lib/client.js",

@@ -68,2 +68,8 @@ import Client from '../../src/client';

it('should return tube stats', function () {
return this.client.statsTube('default').then((stats) => {
expect(stats['current-jobs-ready']).to.be.a.number;
});
});
it('should be able to put and reserve a job', function () {

@@ -100,2 +106,30 @@ let worker = new Client(host, port)

it('should be able to put and reserve a job with extended characters', function () {
let worker = new Client(host, port)
, tube = Math.random().toString()
, values = {};
values["extended_chars"] = "\xF0\x9F\x98\x81";
return worker.connect().then(() => {
return Promise.join(
this.client.use(tube),
worker.watch(tube).then(function () {
return worker.ignore('default');
})
);
}).then(() => {
return this.client.put(0, 0, 180, JSON.stringify(values)).then((putId) => {
return worker.reserveWithTimeout(0).spread((reserveId, body) => {
expect(putId.toString()).to.equal(reserveId.toString());
expect(JSON.parse(body.toString())).to.deep.equal(values);
return worker.destroy(putId);
});
});
}).finally(function () {
worker.quit();
});
});
it('should be able to put a large job', function () {

@@ -102,0 +136,0 @@ let worker = new Client(host, port)

Sorry, the diff of this file is not supported yet

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