Skip to content

Commit

Permalink
given types for reference
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithad0703 committed Apr 22, 2024
1 parent 34874a4 commit 8d0a369
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/api/entry-queryables.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TEntry>()
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();
Expand Down
2 changes: 1 addition & 1 deletion test/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface TEntry {
publish_details: PublishDetails;
author: Author[];
url: string;
reference?: Reference[]
reference?: any;
}


Expand Down

0 comments on commit 8d0a369

Please sign in to comment.