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

amqp-wrapper

Package Overview
Dependencies
Maintainers
7
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amqp-wrapper - npm Package Compare versions

Comparing version 7.0.0-es6.1 to 7.0.0-es6.2

4

amqp.js

@@ -38,4 +38,4 @@ const amqp = require('amqplib');

const { config } = this;
const conn = await amqp.connect(config.url);
this.channel = await conn.createConfirmChannel();
this.connection = await amqp.connect(config.url);
this.channel = await this.connection.createConfirmChannel();
this.channel.prefetch(this.prefetch);

@@ -42,0 +42,0 @@ await this.channel.assertExchange(config.exchange, 'topic', {});

{
"name": "amqp-wrapper",
"version": "7.0.0-es6.1",
"version": "7.0.0-es6.2",
"engines": {

@@ -5,0 +5,0 @@ "node": ">= 8"

@@ -28,3 +28,3 @@ amqp-wrapper

```javascript
var AMQP = require('amqp-wrapper');
const AMQP = require('amqp-wrapper');

@@ -45,3 +45,3 @@ var config = {

var amqp = AMQP(config);
const amqp = new AMQP(config);

@@ -90,5 +90,2 @@ async function main () {

> amqp-wrapper@6.0.0 docs /Users/tim/git/node-amqp-wrapper
> jsdoc2md amqp.js
<a name="AMQPWrapper"></a>

@@ -95,0 +92,0 @@

@@ -176,4 +176,18 @@ const SandboxedModule = require('sandboxed-module');

});
describe('#close', function () {
it('should close the connection', async function () {
var amqpLibMock = require('./amqplibmock')();
var MockedAMQP = SandboxedModule.require('../amqp', {
requires: {
'amqplib': amqpLibMock.mock
}
});
const amqp = new MockedAMQP(config.good);
await amqp.connect();
await amqp.close();
expect(amqpLibMock.closeConnectionSpy).to.have.been.called();
});
});
});
// vim: set et sw=2 colorcolumn=80:

@@ -24,6 +24,9 @@ /**

var connectionMock = {
createConfirmChannel: Sinon.stub().resolves(channelMock),
close: Sinon.stub().resolves()
};
var amqpLibMock = {
connect: Sinon.stub().resolves({
createConfirmChannel: Sinon.stub().resolves(channelMock)
})
connect: Sinon.stub().resolves(connectionMock)
};

@@ -37,4 +40,5 @@

nackSpy: channelMock.nack,
channelMock: channelMock
channelMock: channelMock,
closeConnectionSpy: connectionMock.close
};
};
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