diff --git a/package.json b/package.json index f7d2248..b3396b1 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "eslint-plugin-import": "^2.26.0", "mocha": "^10.0.0", "nyc": "^15.1.0", - "prettier": "^2.8.3", + "prettier": "^3.0.0", "sinon": "^15.0.1" }, "engines": { diff --git a/test/disconnect-spec.js b/test/disconnect-spec.js index 79e3fb7..556454d 100644 --- a/test/disconnect-spec.js +++ b/test/disconnect-spec.js @@ -61,7 +61,7 @@ describe('disconnections', function () { sinon.assert.callCount(arnavmq.connection.getDefaultChannel, retryCount + 1); assert.strictEqual(err.message, expectedError); return true; - } + }, ); }); }); @@ -95,7 +95,7 @@ describe('disconnections', function () { assert.deepStrictEqual( responses, - Array.from({ length: 49 }, (_, i) => i + 2) + Array.from({ length: 49 }, (_, i) => i + 2), ); assert.strictEqual(counter, 50, `consumer counter should be 50, but it is ${counter}`); }); diff --git a/test/producer-consumer-spec.js b/test/producer-consumer-spec.js index 7e646a2..00d686e 100644 --- a/test/producer-consumer-spec.js +++ b/test/producer-consumer-spec.js @@ -68,7 +68,7 @@ describe('producer/consumer', function () { const getChannelDefault = sandbox.spy(Channels.prototype, 'defaultChannel'); await arnavmq.consumer.consume(queueName, { channel: { prefetch } }, (message) => - Promise.resolve(`${message}-test`) + Promise.resolve(`${message}-test`), ); sinon.assert.calledWith(getChannel, queueName, { prefetch }); @@ -89,13 +89,13 @@ describe('producer/consumer', function () { // This is the first one await arnavmq.consumer.consume(queueName, { channel: { prefetch } }, (message) => - Promise.resolve(`${message}-test`) + Promise.resolve(`${message}-test`), ); await assert.rejects(async () => { // This is the second one await arnavmq.consumer.consume(queueName, { channel: { prefetch: prefetch + 1 } }, (message) => - Promise.resolve(`${message}-test`) + Promise.resolve(`${message}-test`), ); }, ChannelAlreadyExistsError); }); @@ -113,7 +113,7 @@ describe('producer/consumer', function () { const consume = sandbox.stub(channel, 'consume').rejects(new Error('Error simulating connection closed.')); await arnavmq.consumer.consume(queueName, { channel: { prefetch } }, (message) => - Promise.resolve(`${message}-test`) + Promise.resolve(`${message}-test`), ); sinon.assert.called(consume); }); @@ -234,7 +234,7 @@ describe('producer/consumer', function () { await utils.timeoutPromise(500); assert.equal(letters, 0); - } + }, ); }); @@ -275,7 +275,7 @@ describe('producer/consumer', function () { done(error); } }, - {} + {}, ) .then(() => arnavmq.producer.produce('', { content: 'ok' }, { routingKey: fixtures.routingKey })) .catch(done); @@ -342,7 +342,7 @@ describe('producer/consumer', function () { .then(() => arnavmq.producer.produce('queue-name-undefined-suffix', { msg: 'test for undefined queue suffix', - }) + }), ); }); }); diff --git a/test/rpc-spec.js b/test/rpc-spec.js index 039d901..f7beb89 100644 --- a/test/rpc-spec.js +++ b/test/rpc-spec.js @@ -67,7 +67,7 @@ describe('Producer/Consumer RPC messaging:', () => { }) .then(() => { assert.fail('Did not get the expected error.'); - }) + }), ) .catch((error) => { if (error instanceof assert.AssertionError) { @@ -79,7 +79,7 @@ describe('Producer/Consumer RPC messaging:', () => { assert.strictEqual( error.name, 'SyntaxError', - `Got unexpected error of type '${error.name}': ${error.message}` + `Got unexpected error of type '${error.name}': ${error.message}`, ); done(); } catch (assertError) {