From 8d0a369ab769440932d74dacfa922aed8206e72d Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Mon, 22 Apr 2024 14:20:56 +0530 Subject: [PATCH] given types for reference --- test/api/entry-queryables.spec.ts | 3 ++- test/api/types.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/api/entry-queryables.spec.ts b/test/api/entry-queryables.spec.ts index 1be56a98..8763f145 100644 --- a/test/api/entry-queryables.spec.ts +++ b/test/api/entry-queryables.spec.ts @@ -245,11 +245,12 @@ describe('Query Operators API test cases', () => { }); it('should check for include reference', async () => { - const query = makeEntries('contenttype_uid2').includeReference('test3').query() + const query = makeEntries('contenttype_uid2').includeReference('reference') const result = await query.find() if (result.entries) { expect(result.entries.length).toBeGreaterThan(0); expect(result.entries[0].reference).toBeDefined(); + expect(result.entries[0].reference[0].title).toBeDefined(); expect(result.entries[0]._version).toBeDefined(); expect(result.entries[0].title).toBeDefined(); expect(result.entries[0].uid).toBeDefined(); diff --git a/test/api/types.ts b/test/api/types.ts index 98ea8473..ac8a85fc 100644 --- a/test/api/types.ts +++ b/test/api/types.ts @@ -10,7 +10,7 @@ export interface TEntry { publish_details: PublishDetails; author: Author[]; url: string; - reference?: Reference[] + reference?: any; }