From d1e08402e6d513e715be867660c8b6c2af5e3dd7 Mon Sep 17 00:00:00 2001 From: Micah Yeager Date: Fri, 14 Jun 2024 15:55:04 -0400 Subject: [PATCH] test(perf): improve test performance by limiting max returned records --- index.test.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/index.test.js b/index.test.js index f0c78a8..31ef3cd 100644 --- a/index.test.js +++ b/index.test.js @@ -27,18 +27,21 @@ it('can get by id', async () => { test('can query multiple.', async () => { - let result = await autotask.Companies.query({filter:[ - { - field: "companyName", - op: FilterOperators.beginsWith, - value: "A" - }, - { - field: "id", - op: FilterOperators.gt, - value: 0 - } - ]}); + let result = await autotask.Companies.query({ + filter: [ + { + field: "companyName", + op: FilterOperators.beginsWith, + value: "A", + }, + { + field: "id", + op: FilterOperators.gt, + value: 0, + }, + ], + MaxRecords: 5, + }); // console.log('query result: %o', result); expect(result.items).toBeDefined(); let item = result.items[0];