Skip to content

Commit

Permalink
fix: typesense-typeorm integration test, add 5ms delay
Browse files Browse the repository at this point in the history
  • Loading branch information
SlumberyDude committed Aug 14, 2023
1 parent e43a57c commit 114186c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ describe('typesense-typeorm', () => {
})
)

await new Promise((r) => {
setTimeout(r, 5)
})

const result = await client.collections('test').documents().search({
q: 'Stark',
query_by: 'company',
Expand All @@ -87,12 +91,16 @@ describe('typesense-typeorm', () => {

await repository.save(entity)

await new Promise((r) => {
setTimeout(r, 5)
})

const result = await client.collections('test').documents().search({
q: 'Stark',
query_by: 'company',
filter_by: 'employees:>1000',
})

expect(result.found).toBe(1)
expect(result.found).toBe(2)
})
})

0 comments on commit 114186c

Please sign in to comment.