Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
```

Expand Down Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-plugin-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 1 addition & 3 deletions tasks/config/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion tasks/jenkins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 1 addition & 5 deletions tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand All @@ -53,7 +49,7 @@ module.exports = function (grunt) {

grunt.registerTask('test:quick', [
'checkPlugins',
'test:server',
'test:mocha',
'run:functionalTests',
'test:jest',
'test:jest_integration',
Expand Down