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

@emartech/rabbitmq-client

Package Overview
Dependencies
Maintainers
67
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emartech/rabbitmq-client - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

2

package.json

@@ -44,3 +44,3 @@ {

},
"version": "2.5.0"
"version": "2.6.0"
}

@@ -101,2 +101,10 @@ 'use strict';

async waitForConfirms() {
if (this._config.useConfirmChannel) {
return await this._channel.waitForConfirms();
}
throw new Error('Waiting for confirmation is only supported with confirmation channels');
}
async purge() {

@@ -103,0 +111,0 @@ await this._channel.purgeQueue(this.queueName);

@@ -44,3 +44,4 @@ 'use strict';

purgeQueue: sandbox.stub().resolves(true),
assertQueue: sandbox.stub().resolves(true)
assertQueue: sandbox.stub().resolves(true),
waitForConfirms: sandbox.stub().resolves(true)
});

@@ -261,2 +262,19 @@

it('#waitForConfirms should wait for message acks by calling waitForConfirms on the channel', async function() {
const rabbitMq = new RabbitMq(config, 'some-queue', 'confirmChannel');
await rabbitMq.connect();
await rabbitMq.createChannel();
await rabbitMq.waitForConfirms();
expect(channelMock.waitForConfirms).to.have.been.called;
});
it('#waitForConfirms should throw an exception when we are not using confirmChannel', async function() {
await rabbitMq.connect();
await rabbitMq.createChannel();
await expect(rabbitMq.waitForConfirms())
.to.be.rejectedWith('Waiting for confirmation is only supported with confirmation channels');
});
describe('with dead channel', () => {

@@ -263,0 +281,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