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

enrise-lock

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enrise-lock - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

index.js

@@ -28,2 +28,4 @@ 'use strict';

this.owner = settings.owner;
_.bindAll(this, _.keys(Lock.prototype));
}

@@ -30,0 +32,0 @@

2

package.json
{
"name": "enrise-lock",
"description": "Lock functionality used within Enrise projects and module's",
"version": "0.1.1",
"version": "0.1.2",
"author": "Team MatchMinds @ Enrise",

@@ -6,0 +6,0 @@ "main": "index.js",

'use strict';
const _ = require('lodash');
const chai = require('chai');

@@ -64,2 +65,26 @@ const sinon = require('sinon');

it('binds all methods to the current scope', () => {
const bindAll = _.bindAll;
_.bindAll = sinon.stub();
const newLock = new Lock({
esClient: esClientStub,
index: 'lock-index',
type: 'lock-type',
owner: 'unittest'
});
expect(_.bindAll).to.have.been.calledWith(newLock, [
'acquire',
'release',
'isLocked',
'list',
'delete',
'_acquireLock',
'_releaseLock'
]);
_.bindAll = bindAll;
});
describe('acquire and release functionality', () => {

@@ -66,0 +91,0 @@ it('returns true when a lock for a resource is requested', (done) => {

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