diff --git a/.ci/Jenkinsfile_flaky b/.ci/Jenkinsfile_flaky index 2f496329dfd8e..33204d7396461 100644 --- a/.ci/Jenkinsfile_flaky +++ b/.ci/Jenkinsfile_flaky @@ -5,11 +5,10 @@ kibanaLibrary.load() def CI_GROUP_PARAM = params.CI_GROUP -// Looks like 'oss:ciGroup:1', 'oss:firefoxSmoke', or 'all:serverMocha' +// Looks like 'oss:ciGroup:1', 'oss:firefoxSmoke' def JOB_PARTS = CI_GROUP_PARAM.split(':') def IS_XPACK = JOB_PARTS[0] == 'xpack' def JOB = JOB_PARTS[1] -def NEED_BUILD = JOB != 'serverMocha' def CI_GROUP = JOB_PARTS.size() > 2 ? JOB_PARTS[2] : '' def EXECUTIONS = params.NUMBER_EXECUTIONS.toInteger() def AGENT_COUNT = getAgentCount(EXECUTIONS) @@ -31,15 +30,13 @@ kibanaPipeline(timeoutMinutes: 180) { print "Agent ${agentNumberInside} - ${agentExecutions} executions" workers.functional('flaky-test-runner', { - if (NEED_BUILD) { - if (!IS_XPACK) { - kibanaPipeline.buildOss() - if (CI_GROUP == '1') { - runbld("./test/scripts/jenkins_build_kbn_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1") - } - } else { - kibanaPipeline.buildXpack() + if (!IS_XPACK) { + kibanaPipeline.buildOss() + if (CI_GROUP == '1') { + runbld("./test/scripts/jenkins_build_kbn_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1") } + } else { + kibanaPipeline.buildXpack() } }, getWorkerMap(agentNumberInside, agentExecutions, worker, workerFailures))() } @@ -60,17 +57,7 @@ kibanaPipeline(timeoutMinutes: 180) { def getWorkerFromParams(isXpack, job, ciGroup) { if (!isXpack) { - if (job == 'serverMocha') { - return kibanaPipeline.functionalTestProcess('serverMocha', { - kibanaPipeline.bash( - """ - source src/dev/ci_setup/setup_env.sh - node scripts/mocha - """, - "run `node scripts/mocha`" - ) - }) - } else if (job == 'accessibility') { + if (job == 'accessibility') { return kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh') } else if (job == 'firefoxSmoke') { return kibanaPipeline.functionalTestProcess('firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh') diff --git a/.ci/teamcity/tests/mocha.sh b/.ci/teamcity/tests/mocha.sh deleted file mode 100755 index acb088220fa78..0000000000000 --- a/.ci/teamcity/tests/mocha.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -source "$(dirname "${0}")/../util.sh" - -checks-reporter-with-killswitch "Mocha Tests" \ - node scripts/mocha diff --git a/.eslintrc.js b/.eslintrc.js index 0f4a4721d5428..be83f6129e157 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -71,11 +71,6 @@ const SAFER_LODASH_SET_DEFINITELYTYPED_HEADER = ` */ `; -const allMochaRulesOff = {}; -Object.keys(require('eslint-plugin-mocha').rules).forEach((k) => { - allMochaRulesOff['mocha/' + k] = 'off'; -}); - module.exports = { root: true, @@ -546,7 +541,6 @@ module.exports = { 'packages/kbn-eslint-import-resolver-kibana/**/*.js', 'packages/kbn-eslint-plugin-eslint/**/*', 'x-pack/gulpfile.js', - 'x-pack/dev-tools/mocha/setup_mocha.js', 'x-pack/scripts/*.js', ], excludedFiles: ['**/integration_tests/**/*'], @@ -578,7 +572,9 @@ module.exports = { */ { files: ['test/harden/*.js', 'packages/elastic-safer-lodash-set/test/*.js'], - rules: allMochaRulesOff, + rules: { + 'mocha/handle-done-callback': 'off', + }, }, { files: ['**/*.{js,mjs,ts,tsx}'], @@ -798,7 +794,6 @@ module.exports = { files: ['x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}'], plugins: ['eslint-plugin-node', 'react'], env: { - mocha: true, jest: true, }, rules: { @@ -934,7 +929,6 @@ module.exports = { files: ['x-pack/plugins/lists/**/*.{js,mjs,ts,tsx}'], plugins: ['eslint-plugin-node'], env: { - mocha: true, jest: true, }, rules: { diff --git a/.teamcity/src/builds/test/QuickTests.kt b/.teamcity/src/builds/test/QuickTests.kt index a294fce9599c3..086f65e4ee26b 100644 --- a/.teamcity/src/builds/test/QuickTests.kt +++ b/.teamcity/src/builds/test/QuickTests.kt @@ -14,7 +14,6 @@ object QuickTests : BuildType({ val testScripts = mapOf( "Test Hardening" to ".ci/teamcity/checks/test_hardening.sh", "Test Projects" to ".ci/teamcity/tests/test_projects.sh", - "Mocha Tests" to ".ci/teamcity/tests/mocha.sh" ) steps { diff --git a/docs/developer/contributing/development-tests.asciidoc b/docs/developer/contributing/development-tests.asciidoc index 647dc8b3f3b26..7aabc480cdaa2 100644 --- a/docs/developer/contributing/development-tests.asciidoc +++ b/docs/developer/contributing/development-tests.asciidoc @@ -17,10 +17,6 @@ root) |Jest (integration) |`**/integration_tests/**/*.test.{js,mjs,ts,tsx}` |`yarn test:jest_integration [test path]` -|Mocha -|`**/__tests__/**/*.js` -|`node scripts/mocha --grep=regexp [test path]` - |Functional |`test/**/config.js` `x-pack/test/**/config.js` |`node scripts/functional_tests_server --config [directory]/config.js``node scripts/functional_test_runner_ --config [directory]/config.js --grep=regexp` @@ -60,8 +56,6 @@ kibana/src/plugins/dashboard/server$ yarn test:jest --coverage yarn jest --coverage --verbose --config /home/tyler/elastic/kibana/src/plugins/dashboard/jest.config.js server ---- -NOTE: There are still a handful of legacy tests that use the Mocha test runner. For those tests, use `node scripts/mocha --grep=regexp [test path]`. Tests using Mocha are located within `__tests__` directories. - [discrete] === Running browser automation tests diff --git a/docs/developer/contributing/development-unit-tests.asciidoc b/docs/developer/contributing/development-unit-tests.asciidoc index 0b85672df333c..3261721c58bab 100644 --- a/docs/developer/contributing/development-unit-tests.asciidoc +++ b/docs/developer/contributing/development-unit-tests.asciidoc @@ -1,20 +1,7 @@ [[development-unit-tests]] == Unit testing frameworks -{kib} is migrating unit testing from `Mocha` to `Jest`. Legacy unit tests -still exist in Mocha but all new unit tests should be written in Jest. - -[discrete] -=== Mocha (legacy) - -Mocha tests are contained in `__tests__` directories. - -*Running Mocha Unit Tests* - -["source","shell"] ------------ -yarn test:mocha ------------ +{kib} is doing unit testing using `Jest`. [discrete] == Jest @@ -92,23 +79,10 @@ the `--debug-brk` flag. You’ll need to connect a remote debugger such as https://github.com/node-inspector/node-inspector[`node-inspector`] to proceed in this mode. -[source,bash] ----- -node scripts/mocha --debug ----- - [discrete] === Unit Testing Plugins -This should work super if you’re using the +Even when using https://github.com/elastic/kibana/tree/master/packages/kbn-plugin-generator[Kibana -plugin generator]. If you’re not using the generator, well, you’re on -your own. We suggest you look at how the generator works. - -To run the tests for just your particular plugin run the following -command from your plugin: - -[source,bash] ----- -yarn test:mocha ----- +plugin generator] we do not enforce a way for unit testing your plugin. Please setup and you use +the tools of your choice. If the plugin will live inside the Kibana repo `Jest` must be used. \ No newline at end of file diff --git a/docs/developer/contributing/interpreting-ci-failures.asciidoc b/docs/developer/contributing/interpreting-ci-failures.asciidoc index f07a2baa7aecd..505aa79849a63 100644 --- a/docs/developer/contributing/interpreting-ci-failures.asciidoc +++ b/docs/developer/contributing/interpreting-ci-failures.asciidoc @@ -27,7 +27,7 @@ image::images/jenkins/job_view.png[] [discrete] === Viewing ciGroup/test Logs -To view the logs for a failed specific ciGroup, jest, mocha, type checkers, linters, etc., click on the *Pipeline Steps* link in from the Job page. +To view the logs for a failed specific ciGroup, jest, type checkers, linters, etc., click on the *Pipeline Steps* link in from the Job page. image::images/jenkins/pipeline_steps_view.png[] diff --git a/package.json b/package.json index 43ee462c0c724..e6c548895e442 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "es": "node scripts/es", "test:jest": "node scripts/jest", "test:jest_integration": "node scripts/jest_integration", - "test:mocha": "node scripts/mocha", "test:ftr": "node scripts/functional_tests", "test:ftr:server": "node scripts/functional_tests_server", "test:ftr:runner": "node scripts/functional_test_runner", diff --git a/packages/README.md b/packages/README.md index 9d9cd4ed7b6e5..a328fe70e201f 100644 --- a/packages/README.md +++ b/packages/README.md @@ -44,23 +44,17 @@ All new packages should use the `@kbn` namespace, and should be marked with ## Unit tests for a package -Currently there are two patterns used to test packages, one using Mocha and one using Jest. These patterns emerged out of convention and we'd like to make them more similar to each other in the near future. +Currently there is only one tool being used in order to test packages which is Jest. Below we will explain how it should be done. -### 1. Mocha -Today a package can follow the pattern of having a `__tests__` directory in each source code directory of a package which contains the tests for that module. These are usually run by Mocha. - -If a package's tests should be run with Mocha, you'll have to opt-in to run them by appending the package's test file pattern(s) to Kibana's `src/dev/mocha/run_mocha_cli.js` file. These will then be run by the unit test runner. - -* `yarn test` or `yarn grunt test` runs all unit tests. -* `node scripts/mocha` runs all Mocha tests. - -### 2. Jest -A package can also follow the pattern of having `.test.js` files as siblings of the source code files, and these run by Jest. +### Jest +A package should follow the pattern of having `.test.js` files as siblings of the source code files, and these run by Jest. A package using the `.test.js` naming convention will have those tests automatically picked up by Jest and run by the unit test runner, currently mapped to the Kibana `test` script in the root `package.json`. * `yarn test` or `yarn grunt test` runs all unit tests. * `yarn jest` runs all Jest tests in Kibana. +In order for the plugin or package to use Jest, a jest.config.js file must be present in it's root. However, there are safeguards for this in CI should a test file be added without a corresponding config file. + ---- Each package can also specify its own `test` script in the package's `package.json`, for cases where you'd prefer to run the tests from the local package directory. diff --git a/packages/kbn-plugin-generator/README.md b/packages/kbn-plugin-generator/README.md index bee8e6c2ca783..4603c9ed7b1ba 100644 --- a/packages/kbn-plugin-generator/README.md +++ b/packages/kbn-plugin-generator/README.md @@ -63,10 +63,6 @@ Generated plugins receive a handful of scripts that can be used during developme Build a distributable archive of your plugin. - - `yarn test:mocha` - - Run the server tests using mocha. - To start kibana run the following command from Kibana root. diff --git a/packages/kbn-test/src/index.ts b/packages/kbn-test/src/index.ts index a88820eb281cc..fa7124a5b042d 100644 --- a/packages/kbn-test/src/index.ts +++ b/packages/kbn-test/src/index.ts @@ -46,12 +46,7 @@ export { readConfigFile } from './functional_test_runner/lib/config/read_config_ export { runFtrCli } from './functional_test_runner/cli'; -export { - createAutoJUnitReporter, - runMochaCli, - setupJUnitReportGeneration, - escapeCdata, -} from './mocha'; +export { setupJUnitReportGeneration, escapeCdata } from './mocha'; export { runFailedTestsReporterCli } from './failed_tests_reporter'; diff --git a/packages/kbn-test/src/mocha/auto_junit_reporter.js b/packages/kbn-test/src/mocha/auto_junit_reporter.js deleted file mode 100644 index b6e79616e1cde..0000000000000 --- a/packages/kbn-test/src/mocha/auto_junit_reporter.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import mocha from 'mocha'; -import { setupJUnitReportGeneration } from './junit_report_generation'; - -const MochaSpecReporter = mocha.reporters.spec; - -export function createAutoJUnitReporter(junitReportOptions) { - return class AutoJUnitReporter { - constructor(runner, options) { - // setup a spec reporter for console output - new MochaSpecReporter(runner, options); - - // in CI we also setup the JUnit reporter - if (process.env.CI && !process.env.DISABLE_JUNIT_REPORTER) { - setupJUnitReportGeneration(runner, junitReportOptions); - } - } - }; -} diff --git a/packages/kbn-test/src/mocha/index.ts b/packages/kbn-test/src/mocha/index.ts index 99c0f6f4230b7..aadf1b7f16a19 100644 --- a/packages/kbn-test/src/mocha/index.ts +++ b/packages/kbn-test/src/mocha/index.ts @@ -17,13 +17,9 @@ * under the License. */ -// @ts-ignore not typed yet -export { createAutoJUnitReporter } from './auto_junit_reporter'; // @ts-ignore not typed yet export { setupJUnitReportGeneration } from './junit_report_generation'; // @ts-ignore not typed yet -export { runMochaCli } from './run_mocha_cli'; -// @ts-ignore not typed yet export { recordLog, snapshotLogsForRunnable } from './log_cache'; // @ts-ignore not typed yet export { escapeCdata } from './xml'; diff --git a/packages/kbn-test/src/mocha/run_mocha_cli.js b/packages/kbn-test/src/mocha/run_mocha_cli.js deleted file mode 100644 index f61b309610341..0000000000000 --- a/packages/kbn-test/src/mocha/run_mocha_cli.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { REPO_ROOT } from '@kbn/utils'; -import getopts from 'getopts'; -import globby from 'globby'; - -export function runMochaCli() { - const opts = getopts(process.argv.slice(2), { - alias: { - t: 'timeout', - }, - boolean: ['no-timeouts'], - }); - - const runInBand = - process.execArgv.includes('--inspect') || process.execArgv.includes('--inspect-brk'); - - // ensure that mocha exits when test have completed - process.argv.push('--exit'); - - // check that we aren't leaking any globals - process.argv.push('--check-leaks'); - // prevent globals injected from canvas plugins from triggering leak check - process.argv.push('--globals', '__core-js_shared__,core,_, '); - - // set default test timeout - if (opts.timeout == null && !opts['no-timeouts']) { - if (runInBand) { - process.argv.push('--no-timeouts'); - } else { - process.argv.push('--timeout', '10000'); - } - } - - // set default slow timeout - if (opts.slow == null) { - process.argv.push('--slow', '5000'); - } - - // set default reporter - if (opts.reporter == null) { - process.argv.push('--reporter', require.resolve('./server_junit_reporter')); - } - - // set default test files - if (!opts._.length) { - globby - .sync( - [ - 'src/**/__tests__/**/*.{js,ts,tsx}', - 'packages/**/__tests__/**/*.{js,ts,tsx}', - 'tasks/**/__tests__/**/*.{js,ts,tsx}', - 'x-pack/common/**/__tests__/**/*.{js,ts,tsx}', - 'x-pack/server/**/__tests__/**/*.{js,ts,tsx}', - `x-pack/legacy/plugins/*/__tests__/**/*.{js,ts,tsx}`, - `x-pack/legacy/plugins/*/common/**/__tests__/**/*.{js,ts,tsx}`, - `x-pack/legacy/plugins/*/**/server/**/__tests__/**/*.{js,ts,tsx}`, - ], - { - cwd: REPO_ROOT, - onlyFiles: true, - absolute: true, - ignore: [ - '**/__tests__/fixtures/**', - 'src/**/public/**', - '**/_*.{js,ts,tsx}', - '**/*.test.*', - 'packages/**/target/**', - ], - } - ) - .forEach((file) => { - process.argv.push(file); - }); - } - - if (runInBand) { - require('mocha/bin/_mocha'); - } else { - require('mocha/bin/mocha'); - } -} diff --git a/packages/kbn-test/src/mocha/server_junit_reporter.js b/packages/kbn-test/src/mocha/server_junit_reporter.js deleted file mode 100644 index c629f401d0580..0000000000000 --- a/packages/kbn-test/src/mocha/server_junit_reporter.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -// when the reporter is loaded by mocha in child process it might be before setup_node_env -require('../../../../src/setup_node_env'); - -module.exports = require('./auto_junit_reporter').createAutoJUnitReporter({ - reportName: 'Server Mocha Tests', -}); diff --git a/scripts/mocha.js b/scripts/mocha.js deleted file mode 100644 index 8d25d18a594cc..0000000000000 --- a/scripts/mocha.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -require('../src/setup_node_env'); -require('@kbn/test').runMochaCli(); diff --git a/src/dev/index.js b/src/dev/index.js index f24eee040c867..d9d0cec0f1573 100644 --- a/src/dev/index.js +++ b/src/dev/index.js @@ -17,6 +17,6 @@ * under the License. */ -export { createAutoJUnitReporter, setupJUnitReportGeneration } from '@kbn/test'; +export { setupJUnitReportGeneration } from '@kbn/test'; export { generateNoticeFromSource } from './notice'; diff --git a/test/scripts/jenkins_unit.sh b/test/scripts/jenkins_unit.sh index 475a2cfb6f3c7..7c9821ea69a36 100755 --- a/test/scripts/jenkins_unit.sh +++ b/test/scripts/jenkins_unit.sh @@ -8,7 +8,6 @@ source test/scripts/jenkins_test_setup.sh # Test ./test/scripts/test/jest_integration.sh -./test/scripts/test/mocha.sh ./test/scripts/test/jest_unit.sh ./test/scripts/test/api_integration.sh @@ -25,4 +24,4 @@ source test/scripts/jenkins_test_setup.sh ./test/scripts/checks/plugins_with_circular_deps.sh ./test/scripts/checks/verify_notice.sh ./test/scripts/checks/test_projects.sh -./test/scripts/checks/test_hardening.sh +./test/scripts/checks/test_hardening.sh \ No newline at end of file diff --git a/test/scripts/test/mocha.sh b/test/scripts/test/mocha.sh deleted file mode 100755 index 5e005c89330ca..0000000000000 --- a/test/scripts/test/mocha.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -source src/dev/ci_setup/setup_env.sh - -# TODO: will remove mocha in another PR -# checks-reporter-with-killswitch "Mocha Tests" \ -# node scripts/mocha diff --git a/test/tsconfig.json b/test/tsconfig.json index df26441b0806f..d62d3b15190ae 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../tsconfig.base.json", "compilerOptions": { "incremental": false, - "types": ["node", "mocha", "flot"] + "types": ["node", "flot"] }, "include": ["**/*", "../typings/elastic__node_crypto.d.ts", "typings/**/*", "../packages/kbn-test/types/ftr_globals/**/*"], "exclude": ["plugin_functional/plugins/**/*", "interpreter_functional/plugins/**/*"], diff --git a/vars/tasks.groovy b/vars/tasks.groovy index 18be6e69a2637..e01fb4220b85d 100644 --- a/vars/tasks.groovy +++ b/vars/tasks.groovy @@ -32,7 +32,6 @@ def test() { tasks([ // These 2 tasks require isolation because of hard-coded, conflicting ports and such, so let's use Docker here kibanaPipeline.scriptTaskDocker('Jest Integration Tests', 'test/scripts/test/jest_integration.sh'), - kibanaPipeline.scriptTaskDocker('Mocha Tests', 'test/scripts/test/mocha.sh'), kibanaPipeline.scriptTask('Jest Unit Tests', 'test/scripts/test/jest_unit.sh'), kibanaPipeline.scriptTask('API Integration Tests', 'test/scripts/test/api_integration.sh'), diff --git a/x-pack/package.json b/x-pack/package.json index 5046def1e3dd8..6197b0fb45c98 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -12,8 +12,7 @@ "build": "../node_modules/.bin/gulp build", "testonly": "echo 'Deprecated, use `yarn test`'", "test": "../node_modules/.bin/gulp test", - "test:jest": "node ../scripts/jest", - "test:mocha": "node scripts/mocha" + "test:jest": "node ../scripts/jest" }, "kibana": { "build": { diff --git a/x-pack/plugins/canvas/storybook/webpack.dll.config.js b/x-pack/plugins/canvas/storybook/webpack.dll.config.js index b830f72692ede..2fa31235ac0bb 100644 --- a/x-pack/plugins/canvas/storybook/webpack.dll.config.js +++ b/x-pack/plugins/canvas/storybook/webpack.dll.config.js @@ -39,7 +39,6 @@ module.exports = { 'jquery', 'lodash', 'markdown-it', - 'mocha', 'monaco-editor', 'prop-types', 'react-ace', diff --git a/x-pack/scripts/mocha.js b/x-pack/scripts/mocha.js deleted file mode 100644 index cc0f94a2a760e..0000000000000 --- a/x-pack/scripts/mocha.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -require('../../scripts/mocha'); diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 3ac7026d16a17..ee926afb2778b 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { // overhead is too significant "incremental": false, - "types": ["mocha", "node", "flot"] + "types": ["node", "flot"] }, "include": ["**/*", "../typings/**/*", "../../packages/kbn-test/types/ftr_globals/**/*"], "exclude": ["../typings/jest.d.ts"],