[7.x] Only report the mocha tests once, as "Mocha tests" (#395… (#39582)

This commit is contained in:
Spencer 2019-06-25 09:02:30 -07:00 committed by GitHub
parent aa80766f02
commit 33512feef8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 17 deletions

View file

@ -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`.

View file

@ -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",

View file

@ -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.

View file

@ -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.

View file

@ -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'),

View file

@ -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',

View file

@ -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',