From ec50f86b0c38da753bfcb57d0a62832051e6071b Mon Sep 17 00:00:00 2001 From: Spencer Date: Thu, 18 Jul 2019 23:24:26 -0700 Subject: [PATCH] [6.8] [jest] disallow invalid describe calls (#41378) (#41490) * [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: # .eslintrc.js # src/legacy/core_plugins/data/public/filter/filter_manager/filter_manager.test.ts # src/legacy/ui/public/courier/fetch/request/serialize_fetch_params/serialize_fetch_params.test.js # src/legacy/ui/public/kfetch/kfetch.test.ts # test/api_integration/apis/management/saved_objects/relationships.js # test/functional/apps/dashboard/create_and_add_embeddables.js # test/functional/apps/dashboard/dashboard_filter_bar.js # test/functional/apps/dashboard/dashboard_filtering.js # test/functional/apps/dashboard/dashboard_listing.js # test/functional/apps/dashboard/dashboard_options.js # test/functional/apps/dashboard/dashboard_query_bar.js # test/functional/apps/dashboard/dashboard_time.js # test/functional/apps/dashboard/embed_mode.js # test/functional/apps/dashboard/empty_dashboard.js # test/functional/apps/dashboard/full_screen_mode.js # test/functional/apps/dashboard/view_edit.js # test/functional/apps/discover/_discover.js # test/functional/apps/visualize/_point_series_options.js # test/functional/apps/visualize/_visualize_listing.js # x-pack/legacy/plugins/canvas/migrations.test.js # x-pack/legacy/plugins/canvas/server/routes/workpad.test.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/grokdebugger/server/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.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/monitoring/server/lib/elasticsearch_settings/__tests__/find_reason.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/routes/jobs.test.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/api_integration/apis/management/index_lifecycle_management/nodes.js # x-pack/test/api_integration/apis/security/roles.js # x-pack/test/functional/apps/canvas/smoke_test.js # x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts # x-pack/test/functional/apps/maps/documents_source/top_hits.js # x-pack/test/functional/apps/maps/es_geo_grid_source.js # x-pack/test/functional/apps/rollup_job/rollup_jobs.js # x-pack/test/functional/apps/spaces/spaces_selection.ts # 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 +- .../core_plugins/elasticsearch/index.test.js | 2 +- .../serialize_fetch_params.test.js | 2 +- .../apis/management/saved_objects/relationships.js | 8 ++++---- test/functional/apps/visualize/_markdown_vis.js | 4 ++-- test/functional/apps/visualize/_pie_chart.js | 2 +- test/functional/apps/visualize/_tile_map.js | 2 +- .../plugins/reporting/server/routes/jobs.test.js | 2 +- .../usage/get_reporting_usage_collector.test.js | 6 +++--- .../server/lib/es_deprecation_logging_apis.test.ts | 4 ++-- x-pack/test/api_integration/apis/security/roles.js | 4 ++-- x-pack/test/functional/apps/canvas/smoke_test.js | 2 +- .../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 +- x-pack/test/reporting/api/bwc_existing_indexes.js | 2 +- .../spaces_api_integration/common/suites/delete.ts | 2 +- 26 files changed, 51 insertions(+), 41 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e5ccd103748c0..298a2338bc191 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -310,6 +310,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 1dbb90861b183..ef5c557a9efee 100644 --- a/packages/kbn-pm/src/utils/projects.test.ts +++ b/packages/kbn-pm/src/utils/projects.test.ts @@ -195,7 +195,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 dacb26fab7065..779ed88256c01 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 820d1895f6bac..66566ce44129d 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 b4a22b7cb3485..d86902e1d9cc7 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/legacy/core_plugins/elasticsearch/index.test.js b/src/legacy/core_plugins/elasticsearch/index.test.js index eebc83158a82d..32237d651eeed 100644 --- a/src/legacy/core_plugins/elasticsearch/index.test.js +++ b/src/legacy/core_plugins/elasticsearch/index.test.js @@ -69,7 +69,7 @@ describe('plugins/elasticsearch', function () { return compact([basePath, path]).join('.'); }; - describe(getKey('ssl.verificationMode'), function () { + describe(`${getKey('ssl.verificationMode')}`, function () { let settings; let sslSettings; diff --git a/src/ui/public/courier/fetch/request/serialize_fetch_params/serialize_fetch_params.test.js b/src/ui/public/courier/fetch/request/serialize_fetch_params/serialize_fetch_params.test.js index ef75700ae9ad7..f97bd9c81ce5d 100644 --- a/src/ui/public/courier/fetch/request/serialize_fetch_params/serialize_fetch_params.test.js +++ b/src/ui/public/courier/fetch/request/serialize_fetch_params/serialize_fetch_params.test.js @@ -115,7 +115,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/test/api_integration/apis/management/saved_objects/relationships.js b/test/api_integration/apis/management/saved_objects/relationships.js index 45b0a8b82e4a2..50febb4c73be0 100644 --- a/test/api_integration/apis/management/saved_objects/relationships.js +++ b/test/api_integration/apis/management/saved_objects/relationships.js @@ -44,7 +44,7 @@ export default function ({ getService }) { indexPatterns: GENERIC_RESPONSE_SCHEMA, }); - describe('searches', async () => { + describe('searches', () => { it('should validate search response schema', async () => { await supertest .get(`/api/kibana/management/saved_objects/relationships/search/960372e0-3224-11e8-a572-ffca06da1357`) @@ -83,7 +83,7 @@ export default function ({ getService }) { }); }); - describe('dashboards', async () => { + describe('dashboards', () => { const DASHBOARD_RESPONSE_SCHEMA = Joi.object().keys({ visualizations: GENERIC_RESPONSE_SCHEMA, }); @@ -126,7 +126,7 @@ export default function ({ getService }) { }); }); - describe('visualizations', async () => { + describe('visualizations', () => { const VISUALIZATIONS_RESPONSE_SCHEMA = Joi.object().keys({ dashboards: GENERIC_RESPONSE_SCHEMA, }); @@ -164,7 +164,7 @@ export default function ({ getService }) { }); }); - describe('index patterns', async () => { + describe('index patterns', () => { const INDEX_PATTERN_RESPONSE_SCHEMA = Joi.object().keys({ searches: GENERIC_RESPONSE_SCHEMA, visualizations: GENERIC_RESPONSE_SCHEMA, diff --git a/test/functional/apps/visualize/_markdown_vis.js b/test/functional/apps/visualize/_markdown_vis.js index 7d6ee24083c49..f94ca170ff75a 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 2a64a7f2630ca..1cc8835e63472 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/_tile_map.js b/test/functional/apps/visualize/_tile_map.js index ab5401931c94e..7904f125a4199 100644 --- a/test/functional/apps/visualize/_tile_map.js +++ b/test/functional/apps/visualize/_tile_map.js @@ -211,7 +211,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/x-pack/plugins/reporting/server/routes/jobs.test.js b/x-pack/plugins/reporting/server/routes/jobs.test.js index 006c5853c2770..dac2000339928 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 078fe1349c3a3..d2bcbd121046f 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/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 cb93bc4b33d6d..317e2a7554e03 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/security/roles.js b/x-pack/test/api_integration/apis/security/roles.js index 54183a5c87b22..dc95ec49013b8 100644 --- a/x-pack/test/api_integration/apis/security/roles.js +++ b/x-pack/test/api_integration/apis/security/roles.js @@ -74,7 +74,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') @@ -191,7 +191,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({ diff --git a/x-pack/test/functional/apps/canvas/smoke_test.js b/x-pack/test/functional/apps/canvas/smoke_test.js index 9d84c662eb99f..1ef915044808a 100644 --- a/x-pack/test/functional/apps/canvas/smoke_test.js +++ b/x-pack/test/functional/apps/canvas/smoke_test.js @@ -15,7 +15,7 @@ export default function canvasSmokeTest({ getService, getPageObjects }) { const log = getService('log'); 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/maps/es_geo_grid_source.js b/x-pack/test/functional/apps/maps/es_geo_grid_source.js index 7dc35660a1f67..cd751664d6c31 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 @@ -28,7 +28,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); @@ -48,7 +48,7 @@ export default function ({ getPageObjects, getService }) { }); }); - describe('geoprecision - data', async ()=> { + describe('geoprecision - 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 532cba839127e..18610542ca700 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 144d61cf88205..255286c7be6bc 100644 --- a/x-pack/test/functional/apps/monitoring/cluster/alerts.js +++ b/x-pack/test/functional/apps/monitoring/cluster/alerts.js @@ -157,7 +157,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 c0012ee04ab71..36747cd87750c 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 053f805d4e46c..ecfb9c71a827a 100644 --- a/x-pack/test/functional/apps/security/management.js +++ b/x-pack/test/functional/apps/security/management.js @@ -38,8 +38,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 d1db4f53e0862..fb04bc980f7ea 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/reporting/api/bwc_existing_indexes.js b/x-pack/test/reporting/api/bwc_existing_indexes.js index 7743e99c03de4..b7a3ed51f6fe9 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 627ff1e17c9c1..23941a196dc93 100644 --- a/x-pack/test/spaces_api_integration/common/suites/delete.ts +++ b/x-pack/test/spaces_api_integration/common/suites/delete.ts @@ -174,7 +174,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`)