Skip to content

Commit

Permalink
fix: fixed query-executor.tests.ts::'wildcard in query'
Browse files Browse the repository at this point in the history
Change-Id: I40450cd2940c95414d0a17df7dbfae39242e032a
  • Loading branch information
evil-shrike committed Sep 13, 2024
1 parent 28b9650 commit 0bc06a5
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions js/src/test/query-executor.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
]);
});
});

0 comments on commit 0bc06a5

Please sign in to comment.