Skip to content

Commit

Permalink
Fix failing jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Oct 7, 2019
1 parent 31fdd6b commit f9ba6d5
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 38 deletions.
39 changes: 20 additions & 19 deletions x-pack/legacy/plugins/actions/server/routes/find.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,24 @@ it('sends proper arguments to action find function', async () => {
expect(response).toEqual(expectedResult);
expect(actionsClient.find).toHaveBeenCalledTimes(1);
expect(actionsClient.find.mock.calls[0]).toMatchInlineSnapshot(`
Array [
Object {
"options": Object {
"defaultSearchOperator": "AND",
"fields": Array [
"description",
],
"hasReference": undefined,
"page": 1,
"perPage": 1,
"search": "text*",
"searchFields": Array [
"description",
],
"sortField": "description",
},
},
]
`);
Array [
Object {
"options": Object {
"defaultSearchOperator": "AND",
"fields": Array [
"description",
],
"filter": undefined,
"hasReference": undefined,
"page": 1,
"perPage": 1,
"search": "text*",
"searchFields": Array [
"description",
],
"sortField": "description",
},
},
]
`);
});
39 changes: 20 additions & 19 deletions x-pack/legacy/plugins/alerting/server/routes/find.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,24 @@ test('sends proper arguments to alert find function', async () => {
expect(response).toEqual(expectedResult);
expect(alertsClient.find).toHaveBeenCalledTimes(1);
expect(alertsClient.find.mock.calls[0]).toMatchInlineSnapshot(`
Array [
Object {
"options": Object {
"defaultSearchOperator": "AND",
"fields": Array [
"description",
],
"hasReference": undefined,
"page": 1,
"perPage": 1,
"search": "text*",
"searchFields": Array [
"description",
],
"sortField": "description",
},
},
]
`);
Array [
Object {
"options": Object {
"defaultSearchOperator": "AND",
"fields": Array [
"description",
],
"filter": undefined,
"hasReference": undefined,
"page": 1,
"perPage": 1,
"search": "text*",
"searchFields": Array [
"description",
],
"sortField": "description",
},
},
]
`);
});

0 comments on commit f9ba6d5

Please sign in to comment.