Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
flevi29 committed Aug 21, 2024
1 parent c8688b3 commit df7248b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -982,17 +982,6 @@ describe.each([
expect(response.hits[0]).not.toHaveProperty('_vectors');
});

test(`${permission} key: Try to search on deleted index and fail`, async () => {
const client = await getClient(permission);
const masterClient = await getClient('Master');
const { taskUid } = await masterClient.index(index.uid).delete();
await masterClient.waitForTask(taskUid);

await expect(
client.index(index.uid).search('prince', {}),
).rejects.toHaveProperty('cause.code', ErrorStatusCode.INDEX_NOT_FOUND);
});

test(`${permission} key: Search with locales`, async () => {
const client = await getClient(permission);
const masterClient = await getClient('Master');
Expand All @@ -1010,6 +999,17 @@ describe.each([

expect(searchResponse.hits.length).toEqual(2);
});

test(`${permission} key: Try to search on deleted index and fail`, async () => {
const client = await getClient(permission);
const masterClient = await getClient('Master');
const { taskUid } = await masterClient.index(index.uid).delete();
await masterClient.waitForTask(taskUid);

await expect(
client.index(index.uid).search('prince', {}),
).rejects.toHaveProperty('cause.code', ErrorStatusCode.INDEX_NOT_FOUND);
});
});

describe.each([{ permission: 'No' }])(
Expand Down

0 comments on commit df7248b

Please sign in to comment.