Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
js-jankisalvi committed Jul 20, 2023
1 parent 4a1890a commit deb69bd
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions x-pack/plugins/cases/server/client/cases/find.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,6 @@ describe('find', () => {
);
});

it('when rootSearchFields attribute in request payload', async () => {
const search = 'sample_text';
const findRequest = createCasesClientMockFindRequest({ search });
await expect(
// @ts-expect-error foo is an invalid field
find({ ...findRequest, rootSearchFields: ['_id'] }, clientArgs)
).rejects.toThrowErrorMatchingInlineSnapshot(
`"Failed to find cases: {\\"search\\":\\"sample_text\\",\\"searchFields\\":[\\"title\\",\\"description\\"],\\"severity\\":\\"low\\",\\"assignees\\":[],\\"reporters\\":[],\\"status\\":\\"open\\",\\"tags\\":[],\\"owner\\":[],\\"sortField\\":\\"createdAt\\",\\"sortOrder\\":\\"desc\\",\\"rootSearchFields\\":[\\"_id\\"]}: Error: invalid keys \\"rootSearchFields,[\\"_id\\"]\\""`
);
});

it('invalid searchFields with array', async () => {
const searchFields = ['foobar'];

Expand Down

0 comments on commit deb69bd

Please sign in to comment.