diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 50c33dc1827cd..ab5963396268a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -355,10 +355,10 @@ To execute both server and browser tests, but skip linting, use `yarn test:quick yarn test:quick ``` -Use `yarn test:server` when you want to run only the server tests. +Use `yarn test:mocha` when you want to run the mocha tests. ```bash -yarn test:server +yarn test:mocha ``` When you'd like to execute individual server-side test files, you can use the command below. Note that this command takes care of configuring Mocha with Babel compilation for you, and you'll be better off avoiding a globally installed `mocha` package. This command is great for development and for quickly identifying bugs. @@ -397,7 +397,7 @@ This should work super if you're using the [Kibana plugin generator](https://git To run the tests for just your particular plugin run the following command from your plugin: ```bash -yarn test:server +yarn test:mocha yarn test:browser --dev # remove the --dev flag to run them once and close ``` @@ -461,8 +461,8 @@ Part of this process only applies to maintainers, since it requires access to Gi Kibana publishes major, minor and patch releases periodically through the year. During this process we run a script against this repo to collect the applicable PRs against that release and generate [Release Notes](https://www.elastic.co/guide/en/kibana/current/release-notes.html). To include your change in the Release Notes: 1. In the title, summarize what the PR accomplishes in language that is meaningful to the user. In general, use present tense (for example, Adds, Fixes) in sentence case. -1. Label the PR with the targeted version (ex: `v7.3.0`). -1. Label the PR with the appropriate GitHub labels: +2. Label the PR with the targeted version (ex: `v7.3.0`). +3. Label the PR with the appropriate GitHub labels: * For a new feature or functionality, use `release_note:enhancement`. * For an external-facing fix, use `release_note:fix`. Exception: docs, build, and test fixes do not go in the Release Notes. Neither fixes for issues that were only on `master` and never have been released. * For a deprecated feature, use `release_note:deprecation`. diff --git a/package.json b/package.json index bb367829c2fbc..3823cdbda914c 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "test:ui": "node scripts/functional_tests", "test:ui:server": "node scripts/functional_tests_server", "test:ui:runner": "node scripts/functional_test_runner", - "test:server": "grunt test:server", + "test:server": "echo 'use yarn test:mocha instead'; exit 1", "test:coverage": "grunt test:coverage", "typespec": "typings-tester --config x-pack/legacy/plugins/canvas/public/lib/aeroelastic/tsconfig.json x-pack/legacy/plugins/canvas/public/lib/aeroelastic/__fixtures__/typescript/typespec_tests.ts", "checkLicenses": "node scripts/check_licenses --dev", diff --git a/packages/kbn-plugin-generator/README.md b/packages/kbn-plugin-generator/README.md index 8aecb52a09c7d..86871978aedeb 100644 --- a/packages/kbn-plugin-generator/README.md +++ b/packages/kbn-plugin-generator/README.md @@ -75,7 +75,7 @@ Generated plugins receive a handful of scripts that can be used during developme Run the browser tests in a real web browser. - - `yarn test:server` + - `yarn test:mocha` Run the server tests using mocha. diff --git a/packages/kbn-plugin-generator/sao_template/template/README.md b/packages/kbn-plugin-generator/sao_template/template/README.md index f88b186fe8f60..59c3adf2713c8 100755 --- a/packages/kbn-plugin-generator/sao_template/template/README.md +++ b/packages/kbn-plugin-generator/sao_template/template/README.md @@ -32,7 +32,7 @@ See the [kibana contributing guide](https://github.com/elastic/kibana/blob/maste Run the browser tests in a real web browser. - - `yarn test:server` + - `yarn test:mocha` Run the server tests using mocha. diff --git a/tasks/config/run.js b/tasks/config/run.js index 09b1c1bd6c588..ed946ea3424be 100644 --- a/tasks/config/run.js +++ b/tasks/config/run.js @@ -148,7 +148,7 @@ module.exports = function (grunt) { ] }), - // used by the test:server task + // used by the test:mocha task // runs all node.js/server mocha tests mocha: scriptWithGithubChecks({ title: 'Mocha tests', @@ -280,8 +280,6 @@ module.exports = function (grunt) { verifyDependencyVersions: gruntTaskWithGithubChecks('Verify dependency versions', 'verifyDependencyVersions'), - test_server: - gruntTaskWithGithubChecks('Server tests', 'test:server'), test_jest: gruntTaskWithGithubChecks('Jest tests', 'test:jest'), test_jest_integration: gruntTaskWithGithubChecks('Jest integration tests', 'test:jest_integration'), diff --git a/tasks/jenkins.js b/tasks/jenkins.js index 91638553f09e5..c3a4058f84f08 100644 --- a/tasks/jenkins.js +++ b/tasks/jenkins.js @@ -33,7 +33,7 @@ module.exports = function (grunt) { 'run:licenses', 'run:verifyDependencyVersions', 'run:verifyNotice', - 'run:test_server', + 'run:mocha', 'run:test_jest', 'run:test_jest_integration', 'run:test_projects', diff --git a/tasks/test.js b/tasks/test.js index 9cca61ddbc85f..d262496d3a7df 100644 --- a/tasks/test.js +++ b/tasks/test.js @@ -32,10 +32,6 @@ module.exports = function (grunt) { ); grunt.registerTask('test:mocha', ['checkPlugins', 'run:mocha']); - grunt.registerTask('test:server', () => { - grunt.log.writeln('`grunt test:server` is deprecated - use `grunt test:mocha`'); - grunt.task.run(['test:mocha']); - }); grunt.registerTask('test:browser', ['checkPlugins', 'run:browserSCSS', 'run:browserTestServer', 'karma:unit']); @@ -53,7 +49,7 @@ module.exports = function (grunt) { grunt.registerTask('test:quick', [ 'checkPlugins', - 'test:server', + 'test:mocha', 'run:functionalTests', 'test:jest', 'test:jest_integration',