From cd1991145bafa893b588b280516e79721648e578 Mon Sep 17 00:00:00 2001 From: Spencer Date: Thu, 18 Jul 2019 21:59:47 -0700 Subject: [PATCH] [7.2] [jest] disallow invalid describe calls (#41378) (#41487) * [jest] disallow invalid describe calls (#41378) * [jest] disallow invalid describe calls * correct other describe calls * remove unnecessary glob * cast decribe names to strings * remove new async describe function # Conflicts: # src/legacy/core_plugins/data/public/filter/filter_manager/filter_manager.test.ts # test/functional/apps/dashboard/dashboard_filtering.js # test/functional/apps/visualize/_point_series_options.js # x-pack/legacy/plugins/cross_cluster_replication/__jest__/client_integration/auto_follow_pattern_list.test.js # x-pack/legacy/plugins/cross_cluster_replication/__jest__/client_integration/follower_indices_list.test.js # x-pack/legacy/plugins/index_management/__jest__/client_integration/home.test.ts # x-pack/legacy/plugins/maps/public/connected_components/map/feature_properties.test.js # x-pack/legacy/plugins/maps/public/connected_components/map/feature_tooltip.test.js # x-pack/legacy/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js # x-pack/legacy/plugins/reporting/export_types/csv/server/__tests__/execute_job.js # x-pack/legacy/plugins/reporting/server/usage/get_reporting_usage_collector.test.js # x-pack/legacy/plugins/security/server/lib/authorization/privileges/privileges.test.ts # x-pack/legacy/plugins/siem/public/components/last_event_time/index.test.tsx # x-pack/legacy/plugins/siem/public/components/page/add_to_kql/index.test.tsx # x-pack/legacy/plugins/siem/public/components/page/hosts/first_last_seen_host/index.test.tsx # x-pack/test/functional/apps/canvas/smoke_test.js # x-pack/test/functional/apps/maps/documents_source/top_hits.js # x-pack/test/functional/apps/rollup_job/rollup_jobs.js # x-pack/test/functional/apps/uptime/monitor.ts # x-pack/test_utils/jest/integration_tests/example_integration.test.ts * fix eslint violations --- .eslintrc.js | 10 ++++++++++ packages/kbn-pm/src/utils/projects.test.ts | 2 +- .../src/components/button/button.test.js | 2 +- .../button/button_icon/button_icon.test.js | 2 +- .../src/components/button/link_button.test.js | 2 +- .../src/components/button/submit_button.test.js | 2 +- .../collapse_button/collapse_button.test.js | 2 +- src/core/public/http/http_service.test.ts | 6 +++--- .../serialize_fetch_params.test.js | 2 +- src/legacy/ui/public/kfetch/kfetch.test.ts | 6 +++--- .../apis/management/saved_objects/relationships.js | 8 ++++---- .../apps/dashboard/create_and_add_embeddables.js | 2 +- .../apps/dashboard/dashboard_filter_bar.js | 8 ++++---- .../apps/dashboard/dashboard_filtering.js | 10 +++++----- .../functional/apps/dashboard/dashboard_listing.js | 4 ++-- .../functional/apps/dashboard/dashboard_options.js | 2 +- .../apps/dashboard/dashboard_query_bar.js | 2 +- test/functional/apps/dashboard/dashboard_time.js | 2 +- test/functional/apps/dashboard/embed_mode.js | 2 +- test/functional/apps/dashboard/empty_dashboard.js | 2 +- test/functional/apps/dashboard/full_screen_mode.js | 2 +- test/functional/apps/dashboard/view_edit.js | 4 ++-- test/functional/apps/discover/_discover.js | 4 ++-- test/functional/apps/visualize/_markdown_vis.js | 4 ++-- test/functional/apps/visualize/_pie_chart.js | 2 +- .../apps/visualize/_point_series_options.js | 2 +- test/functional/apps/visualize/_tile_map.js | 2 +- .../apps/visualize/_visualize_listing.js | 2 +- .../server/routes/__test__/routeFailures.test.ts | 14 +++++++------- x-pack/plugins/canvas/migrations.test.js | 2 +- .../plugins/canvas/server/routes/workpad.test.js | 2 +- .../auto_follow_pattern_list.test.js | 2 +- .../follower_indices_list.test.js | 2 +- .../__tests__/license_pre_routing_factory.js | 2 +- .../public/components/map/feature_tooltip.test.js | 2 +- .../__tests__/find_reason.js | 2 +- .../remote_clusters_list.test.js | 2 +- .../plugins/reporting/server/routes/jobs.test.js | 2 +- .../usage/get_reporting_usage_collector.test.js | 6 +++--- .../authorization/privileges/privileges.test.ts | 2 +- .../components/last_event_time/index.test.tsx | 2 +- .../components/page/add_to_kql/index.test.tsx | 2 +- .../page/hosts/first_last_seen_host/index.test.tsx | 2 +- .../network/first_last_seen_domain/index.test.tsx | 2 +- .../server/lib/es_deprecation_logging_apis.test.ts | 4 ++-- .../management/index_lifecycle_management/nodes.js | 2 +- x-pack/test/api_integration/apis/security/roles.js | 6 +++--- x-pack/test/functional/apps/canvas/smoke_test.js | 2 +- .../discover/feature_controls/discover_spaces.ts | 4 ++-- .../functional/apps/maps/es_geo_grid_source.js | 4 ++-- x-pack/test/functional/apps/maps/layer_errors.js | 14 +++++++------- .../functional/apps/monitoring/cluster/alerts.js | 2 +- .../test/functional/apps/rollup_job/rollup_jobs.js | 2 +- x-pack/test/functional/apps/security/management.js | 4 ++-- .../test/functional/apps/security/rbac_phase1.js | 2 +- .../functional/apps/spaces/spaces_selection.ts | 2 +- x-pack/test/reporting/api/bwc_existing_indexes.js | 2 +- .../spaces_api_integration/common/suites/delete.ts | 2 +- .../integration_tests/example_integration.test.ts | 2 +- 59 files changed, 106 insertions(+), 96 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 7b28443e4e8ed1..7cae0d10d8bd1a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -355,6 +355,16 @@ module.exports = { }, }, + /** + * Jest specific rules + */ + { + files: ['**/*.test.{js,ts,tsx}'], + rules: { + 'jest/valid-describe': 'error', + }, + }, + /** * APM overrides */ diff --git a/packages/kbn-pm/src/utils/projects.test.ts b/packages/kbn-pm/src/utils/projects.test.ts index f127bfd3700121..1b839440b94499 100644 --- a/packages/kbn-pm/src/utils/projects.test.ts +++ b/packages/kbn-pm/src/utils/projects.test.ts @@ -224,7 +224,7 @@ describe('#topologicallyBatchProjects', () => { expect(expectedBatches).toMatchSnapshot(); }); - describe('batchByWorkspace = true', async () => { + describe('batchByWorkspace = true', () => { test('batches projects topologically based on their project dependencies and workspaces', async () => { const batches = topologicallyBatchProjects(projects, graph, { batchByWorkspace: true }); diff --git a/packages/kbn-ui-framework/src/components/button/button.test.js b/packages/kbn-ui-framework/src/components/button/button.test.js index dacb26fab7065a..779ed88256c018 100644 --- a/packages/kbn-ui-framework/src/components/button/button.test.js +++ b/packages/kbn-ui-framework/src/components/button/button.test.js @@ -56,7 +56,7 @@ describe('KuiButton', () => { describe('Props', () => { describe('buttonType', () => { BUTTON_TYPES.forEach(buttonType => { - describe(buttonType, () => { + describe(`${buttonType}`, () => { test(`renders the ${buttonType} class`, () => { const $button = render( { describe('Props', () => { describe('type', () => { ICON_TYPES.forEach(type => { - describe(type, () => { + describe(`${type}`, () => { test(`renders the ${type} class`, () => { const $buttonIcon = render(); expect($buttonIcon).toMatchSnapshot(); diff --git a/packages/kbn-ui-framework/src/components/button/link_button.test.js b/packages/kbn-ui-framework/src/components/button/link_button.test.js index 820d1895f6bacf..66566ce44129d8 100644 --- a/packages/kbn-ui-framework/src/components/button/link_button.test.js +++ b/packages/kbn-ui-framework/src/components/button/link_button.test.js @@ -57,7 +57,7 @@ describe('KuiLinkButton', () => { describe('Props', () => { describe('buttonType', () => { BUTTON_TYPES.forEach(buttonType => { - describe(buttonType, () => { + describe(`${buttonType}`, () => { test(`renders the ${buttonType} class`, () => { const $button = render( { describe('Props', () => { describe('buttonType', () => { BUTTON_TYPES.forEach(buttonType => { - describe(buttonType, () => { + describe(`${buttonType}`, () => { test(`renders the ${buttonType} class`, () => { const $button = render(); expect($button).toMatchSnapshot(); diff --git a/packages/kbn-ui-framework/src/components/collapse_button/collapse_button.test.js b/packages/kbn-ui-framework/src/components/collapse_button/collapse_button.test.js index b4a22b7cb34858..d86902e1d9cc7a 100644 --- a/packages/kbn-ui-framework/src/components/collapse_button/collapse_button.test.js +++ b/packages/kbn-ui-framework/src/components/collapse_button/collapse_button.test.js @@ -31,7 +31,7 @@ describe('KuiCollapseButton', () => { describe('Props', () => { describe('direction', () => { DIRECTIONS.forEach(direction => { - describe(direction, () => { + describe(`${direction}`, () => { test(`renders the ${direction} class`, () => { const component = ; expect(render(component)).toMatchSnapshot(); diff --git a/src/core/public/http/http_service.test.ts b/src/core/public/http/http_service.test.ts index 51f4af44d313d3..dd3506a33145e1 100644 --- a/src/core/public/http/http_service.test.ts +++ b/src/core/public/http/http_service.test.ts @@ -42,7 +42,7 @@ function setupService() { return { httpService, fatalErrors, http }; } -describe('http requests', async () => { +describe('http requests', () => { afterEach(() => { fetchMock.restore(); }); @@ -250,7 +250,7 @@ describe('http requests', async () => { }); }); -describe('addLoadingCount()', async () => { +describe('addLoadingCount()', () => { it('subscribes to passed in sources, unsubscribes on stop', () => { const { httpService, http } = setupService(); @@ -289,7 +289,7 @@ describe('addLoadingCount()', async () => { }); }); -describe('getLoadingCount$()', async () => { +describe('getLoadingCount$()', () => { it('emits 0 initially, the right count when sources emit their own count, and ends with zero', async () => { const { httpService, http } = setupService(); diff --git a/src/legacy/ui/public/courier/fetch/request/serialize_fetch_params/serialize_fetch_params.test.js b/src/legacy/ui/public/courier/fetch/request/serialize_fetch_params/serialize_fetch_params.test.js index 56a2eb93e04166..bca5d05e765571 100644 --- a/src/legacy/ui/public/courier/fetch/request/serialize_fetch_params/serialize_fetch_params.test.js +++ b/src/legacy/ui/public/courier/fetch/request/serialize_fetch_params/serialize_fetch_params.test.js @@ -81,7 +81,7 @@ describe('headers', () => { return JSON.parse(requestParts[0]); }; - describe('search request preference', async () => { + describe('search request preference', () => { test('should be set to sessionId when courier:setRequestPreference is "sessionId"', async () => { const config = { get: () => { diff --git a/src/legacy/ui/public/kfetch/kfetch.test.ts b/src/legacy/ui/public/kfetch/kfetch.test.ts index 79bca9da1d273d..99234fe23984da 100644 --- a/src/legacy/ui/public/kfetch/kfetch.test.ts +++ b/src/legacy/ui/public/kfetch/kfetch.test.ts @@ -137,7 +137,7 @@ describe('kfetch', () => { } }); - describe('when throwing response error (KFetchError)', async () => { + describe('when throwing response error (KFetchError)', () => { let error: KFetchError; beforeEach(async () => { fetchMock.get('*', { status: 404, body: { foo: 'bar' } }); @@ -352,7 +352,7 @@ describe('kfetch', () => { }); }); - describe('when interceptors return synchronously', async () => { + describe('when interceptors return synchronously', () => { let resp: any; beforeEach(async () => { fetchMock.get('*', { foo: 'bar' }); @@ -385,7 +385,7 @@ describe('kfetch', () => { }); }); - describe('when interceptors return promise', async () => { + describe('when interceptors return promise', () => { let resp: any; beforeEach(async () => { fetchMock.get('*', { foo: 'bar' }); diff --git a/test/api_integration/apis/management/saved_objects/relationships.js b/test/api_integration/apis/management/saved_objects/relationships.js index ee369e5c8827ab..8e5152f0f64633 100644 --- a/test/api_integration/apis/management/saved_objects/relationships.js +++ b/test/api_integration/apis/management/saved_objects/relationships.js @@ -52,7 +52,7 @@ export default function ({ getService }) { const getSavedObjectTypesQuery = types => coerceToArray(types).map(type => `savedObjectTypes=${type}`).join('&'); const defaultQuery = getSavedObjectTypesQuery(['visualization', 'index-pattern', 'search', 'dashboard']); - describe('searches', async () => { + describe('searches', () => { it('should validate search response schema', async () => { await supertest .get(`${baseApiUrl}/search/960372e0-3224-11e8-a572-ffca06da1357?${defaultQuery}`) @@ -145,7 +145,7 @@ export default function ({ getService }) { }); }); - describe('dashboards', async () => { + describe('dashboards', () => { it('should validate dashboard response schema', async () => { await supertest .get(`${baseApiUrl}/dashboard/b70c7ae0-3224-11e8-a572-ffca06da1357?${defaultQuery}`) @@ -240,7 +240,7 @@ export default function ({ getService }) { }); }); - describe('visualizations', async () => { + describe('visualizations', () => { it('should validate visualization response schema', async () => { await supertest .get(`${baseApiUrl}/visualization/a42c0580-3224-11e8-a572-ffca06da1357?${defaultQuery}`) @@ -320,7 +320,7 @@ export default function ({ getService }) { }); }); - describe('index patterns', async () => { + describe('index patterns', () => { it('should validate visualization response schema', async () => { await supertest .get(`${baseApiUrl}/index-pattern/8963ca30-3224-11e8-a572-ffca06da1357?${defaultQuery}`) diff --git a/test/functional/apps/dashboard/create_and_add_embeddables.js b/test/functional/apps/dashboard/create_and_add_embeddables.js index dfc472c7af050c..7d20a4e8ab2057 100644 --- a/test/functional/apps/dashboard/create_and_add_embeddables.js +++ b/test/functional/apps/dashboard/create_and_add_embeddables.js @@ -29,7 +29,7 @@ export default function ({ getService, getPageObjects }) { const browser = getService('browser'); const dashboardAddPanel = getService('dashboardAddPanel'); - describe('create and add embeddables', async () => { + describe('create and add embeddables', () => { before(async () => { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); diff --git a/test/functional/apps/dashboard/dashboard_filter_bar.js b/test/functional/apps/dashboard/dashboard_filter_bar.js index 2c1ee7e6043680..7b85c55e17ef28 100644 --- a/test/functional/apps/dashboard/dashboard_filter_bar.js +++ b/test/functional/apps/dashboard/dashboard_filter_bar.js @@ -27,12 +27,12 @@ export default function ({ getService, getPageObjects }) { const pieChart = getService('pieChart'); const PageObjects = getPageObjects(['dashboard', 'header', 'visualize']); - describe('dashboard filter bar', async () => { + describe('dashboard filter bar', () => { before(async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); }); - describe('Add a filter bar', async function () { + describe('Add a filter bar', function () { before(async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); }); @@ -50,7 +50,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('filter editor field list', async function () { + describe('filter editor field list', function () { this.tags(['skipFirefox']); before(async () => { @@ -80,7 +80,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('filter pills', async function () { + describe('filter pills', function () { before(async () => { await filterBar.ensureFieldEditorModalIsClosed(); await PageObjects.dashboard.gotoDashboardLandingPage(); diff --git a/test/functional/apps/dashboard/dashboard_filtering.js b/test/functional/apps/dashboard/dashboard_filtering.js index c3f426e7d56873..efadd9a92a2c44 100644 --- a/test/functional/apps/dashboard/dashboard_filtering.js +++ b/test/functional/apps/dashboard/dashboard_filtering.js @@ -34,12 +34,12 @@ export default function ({ getService, getPageObjects }) { const dashboardPanelActions = getService('dashboardPanelActions'); const PageObjects = getPageObjects(['dashboard', 'header', 'visualize']); - describe('dashboard filtering', async () => { + describe('dashboard filtering', () => { before(async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); }); - describe('adding a filter that excludes all data', async () => { + describe('adding a filter that excludes all data', () => { before(async () => { await PageObjects.dashboard.clickNewDashboard(); await PageObjects.dashboard.setTimepickerInDataRange(); @@ -105,7 +105,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('using a pinned filter that excludes all data', async () => { + describe('using a pinned filter that excludes all data', () => { before(async () => { await filterBar.toggleFilterPinned('bytes'); await PageObjects.header.waitUntilLoadingHasFinished(); @@ -167,7 +167,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('disabling a filter unfilters the data on', async () => { + describe('disabling a filter unfilters the data on', () => { before(async () => { await filterBar.toggleFilterEnabled('bytes'); await PageObjects.header.waitUntilLoadingHasFinished(); @@ -224,7 +224,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('nested filtering', async () => { + describe('nested filtering', () => { before(async () => { await PageObjects.dashboard.gotoDashboardLandingPage(); }); diff --git a/test/functional/apps/dashboard/dashboard_listing.js b/test/functional/apps/dashboard/dashboard_listing.js index 84ab47ae592e26..466a7abd4ce085 100644 --- a/test/functional/apps/dashboard/dashboard_listing.js +++ b/test/functional/apps/dashboard/dashboard_listing.js @@ -30,7 +30,7 @@ export default function ({ getService, getPageObjects }) { await PageObjects.dashboard.initTests(); }); - describe('create prompt', async () => { + describe('create prompt', () => { it('appears when there are no dashboards', async function () { const promptExists = await PageObjects.dashboard.getCreateDashboardPromptExists(); expect(promptExists).to.be(true); @@ -59,7 +59,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('delete', async function () { + describe('delete', function () { it('default confirm action is cancel', async function () { await PageObjects.dashboard.searchForDashboardWithName(dashboardName); await PageObjects.dashboard.checkDashboardListingSelectAllCheckbox(); diff --git a/test/functional/apps/dashboard/dashboard_options.js b/test/functional/apps/dashboard/dashboard_options.js index db1c7091a78f52..4ef015efe78127 100644 --- a/test/functional/apps/dashboard/dashboard_options.js +++ b/test/functional/apps/dashboard/dashboard_options.js @@ -23,7 +23,7 @@ export default function ({ getService, getPageObjects }) { const retry = getService('retry'); const PageObjects = getPageObjects(['dashboard']); - describe('dashboard data-shared attributes', async () => { + describe('dashboard data-shared attributes', () => { let originalTitles = []; before(async () => { diff --git a/test/functional/apps/dashboard/dashboard_query_bar.js b/test/functional/apps/dashboard/dashboard_query_bar.js index f6f3b8a8945181..990f2c83d95612 100644 --- a/test/functional/apps/dashboard/dashboard_query_bar.js +++ b/test/functional/apps/dashboard/dashboard_query_bar.js @@ -25,7 +25,7 @@ export default function ({ getService, getPageObjects }) { const queryBar = getService('queryBar'); const PageObjects = getPageObjects(['dashboard', 'discover']); - describe('dashboard query bar', async () => { + describe('dashboard query bar', () => { before(async () => { await PageObjects.dashboard.loadSavedDashboard('dashboard with filter'); }); diff --git a/test/functional/apps/dashboard/dashboard_time.js b/test/functional/apps/dashboard/dashboard_time.js index 8ce77f7ee46f52..917157e54eee05 100644 --- a/test/functional/apps/dashboard/dashboard_time.js +++ b/test/functional/apps/dashboard/dashboard_time.js @@ -56,7 +56,7 @@ export default function ({ getPageObjects, getService }) { }); }); - describe('dashboard with stored timed', async function () { + describe('dashboard with stored timed', function () { it('is saved with time', async function () { await PageObjects.dashboard.switchToEditMode(); await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); diff --git a/test/functional/apps/dashboard/embed_mode.js b/test/functional/apps/dashboard/embed_mode.js index f5b99bf30ca953..4263abc3acdd88 100644 --- a/test/functional/apps/dashboard/embed_mode.js +++ b/test/functional/apps/dashboard/embed_mode.js @@ -24,7 +24,7 @@ export default function ({ getService, getPageObjects }) { const PageObjects = getPageObjects(['dashboard', 'common']); const browser = getService('browser'); - describe('embed mode', async () => { + describe('embed mode', () => { before(async () => { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); diff --git a/test/functional/apps/dashboard/empty_dashboard.js b/test/functional/apps/dashboard/empty_dashboard.js index 26745ed61910ac..2a7772a32093ba 100644 --- a/test/functional/apps/dashboard/empty_dashboard.js +++ b/test/functional/apps/dashboard/empty_dashboard.js @@ -24,7 +24,7 @@ export default function ({ getService, getPageObjects }) { const dashboardAddPanel = getService('dashboardAddPanel'); const PageObjects = getPageObjects(['dashboard']); - describe('empty dashboard', async () => { + describe('empty dashboard', () => { before(async () => { await PageObjects.dashboard.clickNewDashboard(); }); diff --git a/test/functional/apps/dashboard/full_screen_mode.js b/test/functional/apps/dashboard/full_screen_mode.js index 0475c40eff0c47..3c5ced7339df38 100644 --- a/test/functional/apps/dashboard/full_screen_mode.js +++ b/test/functional/apps/dashboard/full_screen_mode.js @@ -25,7 +25,7 @@ export default function ({ getService, getPageObjects }) { const dashboardPanelActions = getService('dashboardPanelActions'); const PageObjects = getPageObjects(['dashboard', 'common']); - describe('full screen mode', async () => { + describe('full screen mode', () => { before(async () => { await PageObjects.dashboard.loadSavedDashboard('few panels'); }); diff --git a/test/functional/apps/dashboard/view_edit.js b/test/functional/apps/dashboard/view_edit.js index 1c866cd2267ff5..d48bb5bca4bc8d 100644 --- a/test/functional/apps/dashboard/view_edit.js +++ b/test/functional/apps/dashboard/view_edit.js @@ -53,7 +53,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('shows lose changes warning', async function () { + describe('shows lose changes warning', function () { describe('and loses changes on confirmation', function () { beforeEach(async function () { await PageObjects.dashboard.gotoDashboardEditMode(dashboardName); @@ -193,7 +193,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('Does not show lose changes warning', async function () { + describe('Does not show lose changes warning', function () { it('when time changed is not stored with dashboard', async function () { await PageObjects.dashboard.gotoDashboardEditMode(dashboardName); await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: false }); diff --git a/test/functional/apps/discover/_discover.js b/test/functional/apps/discover/_discover.js index 86d14b78a03e15..1b2ddf22e7a69d 100644 --- a/test/functional/apps/discover/_discover.js +++ b/test/functional/apps/discover/_discover.js @@ -380,7 +380,7 @@ export default function ({ getService, getPageObjects }) { } }); - describe('query #2, which has an empty time range', async () => { + describe('query #2, which has an empty time range', () => { const fromTime = '1999-06-11 09:22:11.000'; const toTime = '1999-06-12 11:21:04.000'; @@ -401,7 +401,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('filter editor', async function () { + describe('filter editor', function () { it('should add a phrases filter', async function () { await filterBar.addFilter('extension.raw', 'is one of', 'jpg'); expect(await filterBar.hasFilter('extension.raw', 'jpg')).to.be(true); diff --git a/test/functional/apps/visualize/_markdown_vis.js b/test/functional/apps/visualize/_markdown_vis.js index 4fca691153b362..f50641407fc295 100644 --- a/test/functional/apps/visualize/_markdown_vis.js +++ b/test/functional/apps/visualize/_markdown_vis.js @@ -29,7 +29,7 @@ export default function ({ getPageObjects, getService }) {

Inline HTML that should not be rendered as html

`; - describe('visualize app', async () => { + describe('visualize app', () => { before(async function () { await PageObjects.visualize.navigateToNewVisualization(); await PageObjects.visualize.clickMarkdownWidget(); @@ -37,7 +37,7 @@ export default function ({ getPageObjects, getService }) { await PageObjects.visualize.clickGo(); }); - describe('markdown vis', async () => { + describe('markdown vis', () => { it('should not have inspector enabled', async function () { await inspector.expectIsNotEnabled(); diff --git a/test/functional/apps/visualize/_pie_chart.js b/test/functional/apps/visualize/_pie_chart.js index 12131b34ee376a..d2fb0c586ed433 100644 --- a/test/functional/apps/visualize/_pie_chart.js +++ b/test/functional/apps/visualize/_pie_chart.js @@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }) { const fromTime = '2015-09-19 06:31:44.000'; const toTime = '2015-09-23 18:31:44.000'; - describe('pie chart', async function () { + describe('pie chart', function () { const vizName1 = 'Visualization PieChart'; before(async function () { log.debug('navigateToApp visualize'); diff --git a/test/functional/apps/visualize/_point_series_options.js b/test/functional/apps/visualize/_point_series_options.js index f731faf4bb277b..85e77fa82a18c0 100644 --- a/test/functional/apps/visualize/_point_series_options.js +++ b/test/functional/apps/visualize/_point_series_options.js @@ -185,7 +185,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('x axis labels', async function () { + describe('x axis labels', function () { const expectedLabels = [ '2015-09-20 00:00', '2015-09-21 00:00', diff --git a/test/functional/apps/visualize/_tile_map.js b/test/functional/apps/visualize/_tile_map.js index 7fe6214da78081..05a3365ecd3a2b 100644 --- a/test/functional/apps/visualize/_tile_map.js +++ b/test/functional/apps/visualize/_tile_map.js @@ -209,7 +209,7 @@ export default function ({ getService, getPageObjects }) { }); - describe('Only request data around extent of map option', async () => { + describe('Only request data around extent of map option', () => { it('when checked adds filters to aggregation', async () => { const vizName1 = 'Visualization TileMap'; diff --git a/test/functional/apps/visualize/_visualize_listing.js b/test/functional/apps/visualize/_visualize_listing.js index fda15510b46912..50d8ed4f1ac99a 100644 --- a/test/functional/apps/visualize/_visualize_listing.js +++ b/test/functional/apps/visualize/_visualize_listing.js @@ -25,7 +25,7 @@ export default function ({ getPageObjects }) { describe('visualize listing page', function describeIndexTests() { const vizName = 'Visualize Listing Test'; - describe('create and delete', async function () { + describe('create and delete', function () { before(async function () { await PageObjects.visualize.gotoVisualizationLandingPage(); diff --git a/x-pack/plugins/apm/server/routes/__test__/routeFailures.test.ts b/x-pack/plugins/apm/server/routes/__test__/routeFailures.test.ts index 4db63a4ce58864..86820bf03c7428 100644 --- a/x-pack/plugins/apm/server/routes/__test__/routeFailures.test.ts +++ b/x-pack/plugins/apm/server/routes/__test__/routeFailures.test.ts @@ -13,7 +13,7 @@ import { initTracesApi } from '../traces'; describe('route handlers should fail with a Boom error', () => { let consoleErrorSpy: any; - async function testRouteFailures(init: (core: CoreSetup) => void) { + function testRouteFailures(init: (core: CoreSetup) => void) { const mockServer = { route: jest.fn() }; const mockCore = ({ http: { @@ -65,15 +65,15 @@ describe('route handlers should fail with a Boom error', () => { consoleErrorSpy.mockRestore(); }); - describe('error routes', async () => { - await testRouteFailures(initErrorsApi); + describe('error routes', () => { + testRouteFailures(initErrorsApi); }); - describe('service routes', async () => { - await testRouteFailures(initServicesApi); + describe('service routes', () => { + testRouteFailures(initServicesApi); }); - describe('trace routes', async () => { - await testRouteFailures(initTracesApi); + describe('trace routes', () => { + testRouteFailures(initTracesApi); }); }); diff --git a/x-pack/plugins/canvas/migrations.test.js b/x-pack/plugins/canvas/migrations.test.js index 16954efd49cc07..182ef3b18cce76 100644 --- a/x-pack/plugins/canvas/migrations.test.js +++ b/x-pack/plugins/canvas/migrations.test.js @@ -7,7 +7,7 @@ import { migrations } from './migrations'; import { CANVAS_TYPE } from './common/lib'; -describe(CANVAS_TYPE, () => { +describe(`${CANVAS_TYPE}`, () => { describe('7.0.0', () => { const migrate = doc => migrations[CANVAS_TYPE]['7.0.0'](doc); diff --git a/x-pack/plugins/canvas/server/routes/workpad.test.js b/x-pack/plugins/canvas/server/routes/workpad.test.js index 0c8da43267569c..fcfe87f460b197 100644 --- a/x-pack/plugins/canvas/server/routes/workpad.test.js +++ b/x-pack/plugins/canvas/server/routes/workpad.test.js @@ -252,7 +252,7 @@ Array [ }); }); - describe(`GET ${routePrefix}/find`, async () => { + it(`GET ${routePrefix}/find`, async () => { const request = { method: 'GET', url: `${routePrefix}/find?name=abc&page=2&perPage=10`, diff --git a/x-pack/plugins/cross_cluster_replication/__jest__/client_integration/auto_follow_pattern_list.test.js b/x-pack/plugins/cross_cluster_replication/__jest__/client_integration/auto_follow_pattern_list.test.js index bcc44520ecf691..59229e468ec12c 100644 --- a/x-pack/plugins/cross_cluster_replication/__jest__/client_integration/auto_follow_pattern_list.test.js +++ b/x-pack/plugins/cross_cluster_replication/__jest__/client_integration/auto_follow_pattern_list.test.js @@ -76,7 +76,7 @@ describe('', () => { }); }); - describe('when there are auto-follow patterns', async () => { + describe('when there are auto-follow patterns', () => { let find; let exists; let component; diff --git a/x-pack/plugins/cross_cluster_replication/__jest__/client_integration/follower_indices_list.test.js b/x-pack/plugins/cross_cluster_replication/__jest__/client_integration/follower_indices_list.test.js index 5f5460de5ae999..c3bd4a34fd794d 100644 --- a/x-pack/plugins/cross_cluster_replication/__jest__/client_integration/follower_indices_list.test.js +++ b/x-pack/plugins/cross_cluster_replication/__jest__/client_integration/follower_indices_list.test.js @@ -74,7 +74,7 @@ describe('', () => { }); }); - describe('when there are follower indices', async () => { + describe('when there are follower indices', () => { let find; let exists; let component; diff --git a/x-pack/plugins/grokdebugger/server/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.js b/x-pack/plugins/grokdebugger/server/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.js index 5458dfa9599aa8..bcefb21167499b 100644 --- a/x-pack/plugins/grokdebugger/server/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.js +++ b/x-pack/plugins/grokdebugger/server/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.js @@ -45,7 +45,7 @@ describe('license_pre_routing_factory', () => { }); }); - describe('isAvailable is true', async () => { + describe('isAvailable is true', () => { beforeEach(() => { mockLicenseCheckResults = { isAvailable: true diff --git a/x-pack/plugins/maps/public/components/map/feature_tooltip.test.js b/x-pack/plugins/maps/public/components/map/feature_tooltip.test.js index 1abb22fe93521f..d5e507046d516a 100644 --- a/x-pack/plugins/maps/public/components/map/feature_tooltip.test.js +++ b/x-pack/plugins/maps/public/components/map/feature_tooltip.test.js @@ -49,7 +49,7 @@ const mockTooltipProperties = [ new MockTooltipProperty('foo', 'bar', false) ]; -describe('FeatureTooltip', async () => { +describe('FeatureTooltip', () => { test('should not show close button and not show filter button', async () => { const component = shallow( diff --git a/x-pack/plugins/monitoring/server/lib/elasticsearch_settings/__tests__/find_reason.js b/x-pack/plugins/monitoring/server/lib/elasticsearch_settings/__tests__/find_reason.js index b3515c4c0c0a07..bf3652d8aaa0f4 100644 --- a/x-pack/plugins/monitoring/server/lib/elasticsearch_settings/__tests__/find_reason.js +++ b/x-pack/plugins/monitoring/server/lib/elasticsearch_settings/__tests__/find_reason.js @@ -129,7 +129,7 @@ describe('Elasticsearch Settings Find Reason for No Data', () => { expect(result).to.eql({ found: false }); }); - describe('exporters', async () => { + describe('exporters', () => { it('should warn if all exporters are disabled', async () => { const input = { exporters: { diff --git a/x-pack/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js b/x-pack/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js index 180209a1e18e81..29adc7df396ba2 100644 --- a/x-pack/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js +++ b/x-pack/plugins/remote_clusters/__jest__/client_integration/remote_clusters_list.test.js @@ -79,7 +79,7 @@ describe('', () => { }); }); - describe('when there are remote clusters', async () => { + describe('when there are remote clusters', () => { let find; let exists; let component; diff --git a/x-pack/plugins/reporting/server/routes/jobs.test.js b/x-pack/plugins/reporting/server/routes/jobs.test.js index 8a65a108af8b32..2d1f48dd790a0b 100644 --- a/x-pack/plugins/reporting/server/routes/jobs.test.js +++ b/x-pack/plugins/reporting/server/routes/jobs.test.js @@ -228,7 +228,7 @@ describe(`when job is completed`, () => { expect(headers['content-type']).toBe('application/pdf'); }); - describe(`when non-whitelisted contentType specified in job output`, async () => { + describe(`when non-whitelisted contentType specified in job output`, () => { test(`sets statusCode to 500`, async () => { const { statusCode } = await getCompletedResponse({ outputContentType: 'application/html' }); expect(statusCode).toBe(500); diff --git a/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.test.js b/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.test.js index 078fe1349c3a34..d2bcbd121046fd 100644 --- a/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.test.js +++ b/x-pack/plugins/reporting/server/usage/get_reporting_usage_collector.test.js @@ -70,7 +70,7 @@ test('sets enabled to false when reporting is turned off', async () => { expect(usageStats.enabled).toBe(false); }); -describe('with a basic license', async () => { +describe('with a basic license', () => { let usageStats; beforeAll(async () => { const serverWithBasicLicenseMock = getServerMock(); @@ -93,7 +93,7 @@ describe('with a basic license', async () => { }); }); -describe('with no license', async () => { +describe('with no license', () => { let usageStats; beforeAll(async () => { const serverWithNoLicenseMock = getServerMock(); @@ -116,7 +116,7 @@ describe('with no license', async () => { }); }); -describe('with platinum license', async () => { +describe('with platinum license', () => { let usageStats; beforeAll(async () => { const serverWithPlatinumLicenseMock = getServerMock(); diff --git a/x-pack/plugins/security/server/lib/authorization/privileges/privileges.test.ts b/x-pack/plugins/security/server/lib/authorization/privileges/privileges.test.ts index e18b9ecdf6fe3c..f8916907840149 100644 --- a/x-pack/plugins/security/server/lib/authorization/privileges/privileges.test.ts +++ b/x-pack/plugins/security/server/lib/authorization/privileges/privileges.test.ts @@ -274,7 +274,7 @@ describe('features', () => { expectGetFeatures: false, }, ].forEach(({ group, expectManageSpaces, expectGetFeatures }) => { - describe(group, () => { + describe(`${group}`, () => { test('actions defined only at the feature are included in `all` and `read`', () => { const features: Feature[] = [ { diff --git a/x-pack/plugins/siem/public/components/last_event_time/index.test.tsx b/x-pack/plugins/siem/public/components/last_event_time/index.test.tsx index 63df103b0942e3..60f8a75465e5ba 100644 --- a/x-pack/plugins/siem/public/components/last_event_time/index.test.tsx +++ b/x-pack/plugins/siem/public/components/last_event_time/index.test.tsx @@ -16,7 +16,7 @@ import { TestProviders } from '../../mock'; import { LastEventTime } from '.'; -describe('Last Event Time Stat', async () => { +describe('Last Event Time Stat', () => { // this is just a little hack to silence a warning that we'll get until react // fixes this: https://github.com/facebook/react/pull/14853 // For us that mean we need to upgrade to 16.9.0 diff --git a/x-pack/plugins/siem/public/components/page/add_to_kql/index.test.tsx b/x-pack/plugins/siem/public/components/page/add_to_kql/index.test.tsx index 3888ab3651950d..9bf93e8669d8f1 100644 --- a/x-pack/plugins/siem/public/components/page/add_to_kql/index.test.tsx +++ b/x-pack/plugins/siem/public/components/page/add_to_kql/index.test.tsx @@ -19,7 +19,7 @@ import { createStore, hostsModel, networkModel, State } from '../../../store'; import { AddToKql } from '.'; -describe('AddToKql Component', async () => { +describe('AddToKql Component', () => { const state: State = mockGlobalState; let store = createStore(state, apolloClientObservable); diff --git a/x-pack/plugins/siem/public/components/page/hosts/first_last_seen_host/index.test.tsx b/x-pack/plugins/siem/public/components/page/hosts/first_last_seen_host/index.test.tsx index 0b362c5812bb29..77fab340930130 100644 --- a/x-pack/plugins/siem/public/components/page/hosts/first_last_seen_host/index.test.tsx +++ b/x-pack/plugins/siem/public/components/page/hosts/first_last_seen_host/index.test.tsx @@ -15,7 +15,7 @@ import { TestProviders } from '../../../../mock'; import { FirstLastSeenHost, FirstLastSeenHostType } from '.'; -describe('FirstLastSeen Component', async () => { +describe('FirstLastSeen Component', () => { // this is just a little hack to silence a warning that we'll get until react // fixes this: https://github.com/facebook/react/pull/14853 // For us that mean we need to upgrade to 16.9.0 diff --git a/x-pack/plugins/siem/public/components/page/network/first_last_seen_domain/index.test.tsx b/x-pack/plugins/siem/public/components/page/network/first_last_seen_domain/index.test.tsx index 5d0ae0c1e7400e..791eebeb794ff5 100644 --- a/x-pack/plugins/siem/public/components/page/network/first_last_seen_domain/index.test.tsx +++ b/x-pack/plugins/siem/public/components/page/network/first_last_seen_domain/index.test.tsx @@ -16,7 +16,7 @@ import { TestProviders } from '../../../../mock'; import { FirstLastSeenDomain } from './index'; -describe('FirstLastSeen Component', async () => { +describe('FirstLastSeen Component', () => { // this is just a little hack to silence a warning that we'll get until react // fixes this: https://github.com/facebook/react/pull/14853 // For us that mean we need to upgrade to 16.9.0 diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecation_logging_apis.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecation_logging_apis.test.ts index cb93bc4b33d6df..317e2a7554e038 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecation_logging_apis.test.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecation_logging_apis.test.ts @@ -21,7 +21,7 @@ describe('getDeprecationLoggingStatus', () => { }); describe('setDeprecationLogging', () => { - describe('isEnabled = true', async () => { + describe('isEnabled = true', () => { it('calls cluster.putSettings with logger.deprecation = WARN', async () => { const callWithRequest = jest.fn(); await setDeprecationLogging(callWithRequest, {} as any, true); @@ -31,7 +31,7 @@ describe('setDeprecationLogging', () => { }); }); - describe('isEnabled = false', async () => { + describe('isEnabled = false', () => { it('calls cluster.putSettings with logger.deprecation = ERROR', async () => { const callWithRequest = jest.fn(); await setDeprecationLogging(callWithRequest, {} as any, false); diff --git a/x-pack/test/api_integration/apis/management/index_lifecycle_management/nodes.js b/x-pack/test/api_integration/apis/management/index_lifecycle_management/nodes.js index 27c575e7265b93..5ce1d7d956d671 100644 --- a/x-pack/test/api_integration/apis/management/index_lifecycle_management/nodes.js +++ b/x-pack/test/api_integration/apis/management/index_lifecycle_management/nodes.js @@ -33,7 +33,7 @@ export default function ({ getService }) { }); }); - describe('detail', async () => { + describe('detail', () => { it('should return the node stats when providing a custom node attribute', async () => { // Load the stats from ES js client const nodeStats = await getNodesStats(); diff --git a/x-pack/test/api_integration/apis/security/roles.js b/x-pack/test/api_integration/apis/security/roles.js index f5a6631afb32ee..d1d4c3c7b7af88 100644 --- a/x-pack/test/api_integration/apis/security/roles.js +++ b/x-pack/test/api_integration/apis/security/roles.js @@ -88,7 +88,7 @@ export default function ({ getService }) { }); }); - it(`should ${basic ? 'not' : ''} create a role with kibana and FLS/DLS elasticsearch + it(`should ${basic ? 'not' : ''} create a role with kibana and FLS/DLS elasticsearch privileges on ${basic ? 'basic' : 'trial'} licenses`, async () => { await supertest.put('/api/security/role/role_with_privileges_dls_fls') .set('kbn-xsrf', 'xxx') @@ -219,7 +219,7 @@ export default function ({ getService }) { }); }); - it(`should ${basic ? 'not' : ''} update a role adding DLS and TLS priviledges + it(`should ${basic ? 'not' : ''} update a role adding DLS and TLS priviledges when using ${basic ? 'basic' : 'trial'} license`, async () => { await es.shield.putRole({ @@ -267,7 +267,7 @@ export default function ({ getService }) { }); }); - describe('Get Role', async () => { + describe('Get Role', () => { it('should get roles', async () => { await es.shield.putRole({ name: 'role_to_get', diff --git a/x-pack/test/functional/apps/canvas/smoke_test.js b/x-pack/test/functional/apps/canvas/smoke_test.js index b309472f382c68..5affc3b5875afa 100644 --- a/x-pack/test/functional/apps/canvas/smoke_test.js +++ b/x-pack/test/functional/apps/canvas/smoke_test.js @@ -14,7 +14,7 @@ export default function canvasSmokeTest({ getService, getPageObjects }) { const retry = getService('retry'); const PageObjects = getPageObjects(['common']); - describe('smoke test', async () => { + describe('smoke test', () => { const workpadListSelector = 'canvasWorkpadLoaderTable canvasWorkpadLoaderWorkpad'; const testWorkpadId = 'workpad-1705f884-6224-47de-ba49-ca224fe6ec31'; diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts index 32c90c65c4a923..341e87c453c298 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts @@ -117,7 +117,7 @@ export default function({ getPageObjects, getService }: KibanaFunctionalTestDefa }); }); - describe('space with Visualize disabled', async () => { + describe('space with Visualize disabled', () => { before(async () => { // we need to load the following in every situation as deleting // a space deletes all of the associated saved objects @@ -144,7 +144,7 @@ export default function({ getPageObjects, getService }: KibanaFunctionalTestDefa }); }); - describe('space with index pattern management disabled', async () => { + describe('space with index pattern management disabled', () => { before(async () => { await spacesService.create({ id: 'custom_space', diff --git a/x-pack/test/functional/apps/maps/es_geo_grid_source.js b/x-pack/test/functional/apps/maps/es_geo_grid_source.js index 1ee034d07689c7..f24029dae8d5f4 100644 --- a/x-pack/test/functional/apps/maps/es_geo_grid_source.js +++ b/x-pack/test/functional/apps/maps/es_geo_grid_source.js @@ -30,7 +30,7 @@ export default function ({ getPageObjects, getService }) { function makeRequestTestsForGeoPrecision(LAYER_ID) { - describe('geoprecision - requests', async () => { + describe('geoprecision - requests', () => { let beforeTimestamp; beforeEach(async () => { await PageObjects.maps.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 1); @@ -58,7 +58,7 @@ export default function ({ getPageObjects, getService }) { }); }); - describe('geotile grid precision - data', async ()=> { + describe('geotile grid precision - data', ()=> { beforeEach(async () => { await PageObjects.maps.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 1); diff --git a/x-pack/test/functional/apps/maps/layer_errors.js b/x-pack/test/functional/apps/maps/layer_errors.js index 1fe9778a44db36..142ea7c4bf0252 100644 --- a/x-pack/test/functional/apps/maps/layer_errors.js +++ b/x-pack/test/functional/apps/maps/layer_errors.js @@ -16,7 +16,7 @@ export default function ({ getPageObjects }) { await PageObjects.maps.loadSavedMap('layer with errors'); }); - describe('ESSearchSource with missing index pattern id', async () => { + describe('ESSearchSource with missing index pattern id', () => { const MISSING_INDEX_ID = 'idThatDoesNotExitForESSearchSource'; const LAYER_NAME = MISSING_INDEX_ID; @@ -33,7 +33,7 @@ export default function ({ getPageObjects }) { }); }); - describe('ESGeoGridSource with missing index pattern id', async () => { + describe('ESGeoGridSource with missing index pattern id', () => { const MISSING_INDEX_ID = 'idThatDoesNotExitForESGeoGridSource'; const LAYER_NAME = MISSING_INDEX_ID; @@ -49,7 +49,7 @@ export default function ({ getPageObjects }) { }); }); - describe('ESJoinSource with missing index pattern id', async () => { + describe('ESJoinSource with missing index pattern id', () => { const MISSING_INDEX_ID = 'idThatDoesNotExitForESJoinSource'; const LAYER_NAME = 'geo_shapes*'; @@ -65,7 +65,7 @@ export default function ({ getPageObjects }) { }); }); - describe('EMSFileSource with missing EMS id', async () => { + describe('EMSFileSource with missing EMS id', () => { const MISSING_EMS_ID = 'idThatDoesNotExitForEMSFileSource'; const LAYER_NAME = 'EMS_vector_shapes'; @@ -81,7 +81,7 @@ export default function ({ getPageObjects }) { }); }); - describe('EMSTMSSource with missing EMS id', async () => { + describe('EMSTMSSource with missing EMS id', () => { const MISSING_EMS_ID = 'idThatDoesNotExitForEMSTile'; const LAYER_NAME = 'EMS_tiles'; @@ -97,7 +97,7 @@ export default function ({ getPageObjects }) { }); }); - describe('KibanaRegionmapSource with missing region map configuration', async () => { + describe('KibanaRegionmapSource with missing region map configuration', () => { const MISSING_REGION_NAME = 'nameThatDoesNotExitForKibanaRegionmapSource'; const LAYER_NAME = 'Custom_vector_shapes'; @@ -113,7 +113,7 @@ export default function ({ getPageObjects }) { }); }); - describe('KibanaTilemapSource with missing map.tilemap.url configuration', async () => { + describe('KibanaTilemapSource with missing map.tilemap.url configuration', () => { const LAYER_NAME = 'Custom_TMS'; it('should diplay error message in layer panel', async () => { diff --git a/x-pack/test/functional/apps/monitoring/cluster/alerts.js b/x-pack/test/functional/apps/monitoring/cluster/alerts.js index 0a2ffb90c536d2..e20fde98064bfc 100644 --- a/x-pack/test/functional/apps/monitoring/cluster/alerts.js +++ b/x-pack/test/functional/apps/monitoring/cluster/alerts.js @@ -161,7 +161,7 @@ export default function ({ getService, getPageObjects }) { }); }); - describe('alert actions take you to the elasticsearch indices listing', async () => { + describe('alert actions take you to the elasticsearch indices listing', () => { const { setup, tearDown } = getLifecycleMethods(getService, getPageObjects); before(async () => { diff --git a/x-pack/test/functional/apps/rollup_job/rollup_jobs.js b/x-pack/test/functional/apps/rollup_job/rollup_jobs.js index 5546cd9311ef1b..0ba379af70e39a 100644 --- a/x-pack/test/functional/apps/rollup_job/rollup_jobs.js +++ b/x-pack/test/functional/apps/rollup_job/rollup_jobs.js @@ -12,7 +12,7 @@ export default function ({ getService, getPageObjects }) { const log = getService('log'); const PageObjects = getPageObjects(['security', 'rollup', 'common', 'header']); - describe('rollup job', async () => { + describe('rollup job', () => { before(async () => { // init data await Promise.all([ diff --git a/x-pack/test/functional/apps/security/management.js b/x-pack/test/functional/apps/security/management.js index 725cef08d9565e..dc62ad504706f3 100644 --- a/x-pack/test/functional/apps/security/management.js +++ b/x-pack/test/functional/apps/security/management.js @@ -40,8 +40,8 @@ export default function ({ getService, getPageObjects }) { await PageObjects.settings.navigateTo(); }); - describe('Security', async () => { - describe('navigation', async () => { + describe('Security', () => { + describe('navigation', () => { it('Can navigate to create user section', async () => { await PageObjects.security.clickElasticsearchUsers(); await PageObjects.security.clickCreateNewUser(); diff --git a/x-pack/test/functional/apps/security/rbac_phase1.js b/x-pack/test/functional/apps/security/rbac_phase1.js index fbe2f8b66c59b3..9b8be614c9f5bf 100644 --- a/x-pack/test/functional/apps/security/rbac_phase1.js +++ b/x-pack/test/functional/apps/security/rbac_phase1.js @@ -14,7 +14,7 @@ export default function ({ getService, getPageObjects }) { const browser = getService('browser'); const kibanaServer = getService('kibanaServer'); - describe('rbac ', async function () { + describe('rbac ', function () { before(async () => { await browser.setWindowSize(1600, 1000); log.debug('users'); diff --git a/x-pack/test/functional/apps/spaces/spaces_selection.ts b/x-pack/test/functional/apps/spaces/spaces_selection.ts index 578ca05dbee9c1..981964007ddf61 100644 --- a/x-pack/test/functional/apps/spaces/spaces_selection.ts +++ b/x-pack/test/functional/apps/spaces/spaces_selection.ts @@ -91,7 +91,7 @@ export default function spaceSelectorFunctonalTests({ await esArchiver.unload('spaces/selector'); }); - describe('displays separate data for each space', async () => { + describe('displays separate data for each space', () => { it('in the default space', async () => { await PageObjects.common.navigateToApp('dashboard'); await expectDashboardRenders('[Logs] Web Traffic'); diff --git a/x-pack/test/reporting/api/bwc_existing_indexes.js b/x-pack/test/reporting/api/bwc_existing_indexes.js index 7743e99c03de42..b7a3ed51f6fe90 100644 --- a/x-pack/test/reporting/api/bwc_existing_indexes.js +++ b/x-pack/test/reporting/api/bwc_existing_indexes.js @@ -20,7 +20,7 @@ export default function ({ getService }) { const reportingAPI = getService('reportingAPI'); const usageAPI = getService('usageAPI'); - describe('BWC report generation into existing indexes', async () => { + describe('BWC report generation into existing indexes', () => { let expectedCompletedReportCount; let cleanupIndexAlias; diff --git a/x-pack/test/spaces_api_integration/common/suites/delete.ts b/x-pack/test/spaces_api_integration/common/suites/delete.ts index 2cf2d9388665aa..9ec01980015115 100644 --- a/x-pack/test/spaces_api_integration/common/suites/delete.ts +++ b/x-pack/test/spaces_api_integration/common/suites/delete.ts @@ -164,7 +164,7 @@ export function deleteTestSuiteFactory(es: any, esArchiver: any, supertest: Supe .then(tests.exists.response); }); - describe(`when the space is reserved`, async () => { + describe(`when the space is reserved`, () => { it(`should return ${tests.reservedSpace.statusCode}`, async () => { return supertest .delete(`${getUrlPrefix(spaceId)}/api/spaces/space/default`) diff --git a/x-pack/test_utils/jest/integration_tests/example_integration.test.ts b/x-pack/test_utils/jest/integration_tests/example_integration.test.ts index dd8890299f6e1d..2160a99dc423fb 100644 --- a/x-pack/test_utils/jest/integration_tests/example_integration.test.ts +++ b/x-pack/test_utils/jest/integration_tests/example_integration.test.ts @@ -7,7 +7,7 @@ import * as kbnTestServer from '../../../../src/test_utils/kbn_server'; import { TestKbnServerConfig } from '../../kbn_server_config'; -describe('example integration test with kbn server', async () => { +describe('example integration test with kbn server', () => { let servers: any = null; beforeAll(async () => { servers = await kbnTestServer.startTestServers({