From 6a00b0f4b620ae120060473e22fbf190637ae55a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20C=2E=20Marti=CC=81nez?= Date: Tue, 10 Dec 2024 20:33:25 +0100 Subject: [PATCH] fix: PromisePoolCluster.of returns PromisePoolCluster instead of PoolNamespace (#3091) --- .../test-promise-wrapper.test.mjs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/test/esm/integration/pool-cluster/test-promise-wrapper.test.mjs b/test/esm/integration/pool-cluster/test-promise-wrapper.test.mjs index b6177378c5..c103721b33 100644 --- a/test/esm/integration/pool-cluster/test-promise-wrapper.test.mjs +++ b/test/esm/integration/pool-cluster/test-promise-wrapper.test.mjs @@ -86,23 +86,24 @@ const { createPoolCluster } = require('../../../../promise.js'); const poolNamespace = poolCluster.of('MASTER'); - assert.equal(poolNamespace.poolNamespace, poolCluster.poolCluster.of('MASTER')); + assert.equal( + poolNamespace.poolNamespace, + poolCluster.poolCluster.of('MASTER'), + ); const connection = await poolNamespace.getConnection(); assert.ok(connection, 'should get connection'); connection.release(); - const [result] = await poolNamespace.query( - 'SELECT 1 as a where 1 = ?', - [1], - ); + const [result] = await poolNamespace.query('SELECT 1 as a where 1 = ?', [ + 1, + ]); assert.equal(result[0]['a'], 1, 'should query successfully'); - const [result2] = await poolNamespace.execute( - 'SELECT 1 as a where 1 = ?', - [1], - ); + const [result2] = await poolNamespace.execute('SELECT 1 as a where 1 = ?', [ + 1, + ]); assert.equal(result2[0]['a'], 1, 'should execute successfully'); poolCluster.end();