From fde464e473cfebea7552052c500e0ca9bb01a94e Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Mon, 9 Nov 2020 21:41:57 -0600 Subject: [PATCH] Clearer assertion --- .../server/search/eql_search_strategy.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/data_enhanced/server/search/eql_search_strategy.test.ts b/x-pack/plugins/data_enhanced/server/search/eql_search_strategy.test.ts index cd8428efa4851..a18b2ac8e00e5 100644 --- a/x-pack/plugins/data_enhanced/server/search/eql_search_strategy.test.ts +++ b/x-pack/plugins/data_enhanced/server/search/eql_search_strategy.test.ts @@ -197,7 +197,7 @@ describe('EQL search strategy', () => { }); describe('response', () => { - it('contains a rawResponse with body and meta', async () => { + it('contains a rawResponse field containing the full search response', async () => { const eqlSearch = await eqlSearchStrategyProvider(mockLogger); const response = await eqlSearch .search({ id: 'my-search-id', options: { ignore: [400] } }, {}, mockDeps) @@ -206,9 +206,9 @@ describe('EQL search strategy', () => { expect(response).toEqual( expect.objectContaining({ rawResponse: expect.objectContaining({ - body: expect.any(Object), - meta: expect.any(Object), - statusCode: 200, + body: getMockEqlResponse().body, + meta: getMockEqlResponse().meta, + statusCode: getMockEqlResponse().statusCode, }), }) );