From 0bc06a53d76752b9c636f786dfe5953bf8f70506 Mon Sep 17 00:00:00 2001 From: Sergei Dorogin Date: Thu, 12 Sep 2024 16:29:13 +0400 Subject: [PATCH] fix: fixed query-executor.tests.ts::'wildcard in query' Change-Id: I40450cd2940c95414d0a17df7dbfae39242e032a --- js/src/test/query-executor.tests.ts | 35 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/js/src/test/query-executor.tests.ts b/js/src/test/query-executor.tests.ts index eccfe7bb..83c4a3e8 100644 --- a/js/src/test/query-executor.tests.ts +++ b/js/src/test/query-executor.tests.ts @@ -348,25 +348,24 @@ suite('AdsQueryExecutor', () => { ]); const result = await executor.executeOne(query, customerId); + + // assert assert.ok(result.rows); - const status = [result.rows[0] as any][ - result.query.columnNames.indexOf('status') - ]; + const status = result.rows[0][result.query.columnNames.indexOf('status')]; assert.strictEqual(status, 'CANCELED'); - - // // assert - // assert.ok(result.rows); - // assert.deepStrictEqual(result.rows[0], [ - // 1, - // "customerClients/2", - // "USD", - // "test customer", - // false, - // 0, - // false, - // "customers/1/customerClients/2", - // 3, - // false, "UTC" - // ]); + assert.deepStrictEqual(result.rows[0], [ + 1, // id + 'customers/1/customerClients/2', //resource_name + 'customerClients/2', // client_customer + false, // hidden + 0, // level + 'UTC', // time_zone + false, // test_account + false, // manager + 'test customer', // descriptive_name + 'USD', // currency_code + 'CANCELED', // status + false, // is_manager + ]); }); });