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

[test] consolidate top level npm scripts #41133

Closed
jbudz opened this issue Jul 15, 2019 · 1 comment · Fixed by #44679
Closed

[test] consolidate top level npm scripts #41133

jbudz opened this issue Jul 15, 2019 · 1 comment · Fixed by #44679
Assignees
Labels
chore enhancement New value added to drive a business result Team:Operations Team label for Operations Team

Comments

@jbudz
Copy link
Member

jbudz commented Jul 15, 2019

Currently npm scripts are a mixed combination of either the test type or the test framework. Lets package all of the under the test framework.

diff --git a/package.json b/package.json
index ec9237a35b..66cc67a6bc 100644
--- a/package.json
+++ b/package.json
@@ -40,15 +40,13 @@
     "kbn": "node scripts/kbn",
     "es": "node scripts/es",
     "test": "grunt test",
-    "test:dev": "grunt test:dev",
-    "test:quick": "grunt test:quick",
-    "test:browser": "grunt test:browser",
+    "test:karma": "grunt test:browser",
+    "test:karma:debug": "grunt test:dev",
     "test:jest": "node scripts/jest",
-    "test:mocha": "grunt test:mocha",
-    "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:mocha": "node scripts/mocha",
+    "test:functional": "node scripts/functional_tests",
+    "test:functional:server": "node scripts/functional_tests_server",
+    "test:functional:runner": "node scripts/functional_test_runner",
     "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",
@@ -56,12 +54,10 @@
     "start": "node --trace-warnings --trace-deprecation scripts/kibana --dev ",
     "debug": "node --nolazy --inspect scripts/kibana --dev",
     "debug-break": "node --nolazy --inspect-brk scripts/kibana --dev",
-    "karma": "karma start",
     "lint": "yarn run lint:es && yarn run lint:sass",
     "lint:es": "node scripts/eslint",
     "lint:sass": "node scripts/sasslint",
     "makelogs": "node scripts/makelogs",
-    "mocha": "node scripts/mocha",
     "uiFramework:start": "cd packages/kbn-ui-framework && yarn docSiteStart",
     "uiFramework:build": "cd packages/kbn-ui-framework && yarn docSiteBuild",
     "uiFramework:createComponent": "cd packages/kbn-ui-framework && yarn createComponent",
@@ -70,7 +66,13 @@
     "build:types": "tsc --p tsconfig.types.json",
     "core:acceptApiChanges": "node scripts/check_core_api_changes.js --accept",
     "kbn:bootstrap": "yarn build:types && node scripts/register_git_hook",
-    "spec_to_console": "node scripts/spec_to_console"
+    "spec_to_console": "node scripts/spec_to_console",
+
+    "test:dev": "echo 'use `npm run test:karma:debug`' && false",
+    "test:server": "echo 'use `npm run test:mocha`' && false",
+    "test:browser": "echo 'use `npm run test:karma && false",
+    "mocha": "echo 'use `npm run test:mocha && false",
+    "karma": "echo 'use `npm run test:karma && false"
   },
   "repository": {
     "type": "git",
@jbudz jbudz mentioned this issue Jul 15, 2019
10 tasks
@mistic mistic added enhancement New value added to drive a business result Team:Operations Team label for Operations Team labels Jul 15, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations

@mistic mistic added the chore label Jul 15, 2019
jbudz added a commit to jbudz/kibana that referenced this issue Jan 27, 2020
Over the last few years we've increased the number of test runners.
Entry points by test type have become too lage of a category for unique
names, so this moves top level test scripts under yarn and replaces test
types with the runner name.

e.g. `yarn test:browser` -> `yarn test:karma`

Closes elastic#41133
jbudz added a commit to jbudz/kibana that referenced this issue Jan 27, 2020
Over the last few years we've increased the number of test runners.
Entry points by test type have become too lage of a category for unique
names, so this moves top level test scripts under yarn and replaces test
types with the runner name.

e.g. `yarn test:browser` -> `yarn test:karma`

Closes elastic#41133
jbudz added a commit that referenced this issue Feb 18, 2020
Over the last few years we've increased the number of test runners.
Entry points by test type have become too lage of a category for unique
names, so this moves top level test scripts under yarn and replaces test
types with the runner name.

e.g. `yarn test:browser` -> `yarn test:karma`

Closes #41133

Co-authored-by: Elastic Machine <[email protected]>
jbudz added a commit that referenced this issue Feb 21, 2020
* Refactor test entry by runner (#44679)

Over the last few years we've increased the number of test runners.
Entry points by test type have become too lage of a category for unique
names, so this moves top level test scripts under yarn and replaces test
types with the runner name.

e.g. `yarn test:browser` -> `yarn test:karma`

Closes #41133

Co-authored-by: Elastic Machine <[email protected]>

* fix merge

Co-authored-by: Elastic Machine <[email protected]>
spalger pushed a commit to spalger/kibana that referenced this issue May 15, 2020
Over the last few years we've increased the number of test runners.
Entry points by test type have become too lage of a category for unique
names, so this moves top level test scripts under yarn and replaces test
types with the runner name.

e.g. `yarn test:browser` -> `yarn test:karma`

Closes elastic#41133

Co-authored-by: Elastic Machine <[email protected]>

# Conflicts:
#	packages/kbn-plugin-generator/sao_template/template/README.md
#	packages/kbn-plugin-helpers/lib/tasks.js
#	test/scripts/jenkins_xpack.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore enhancement New value added to drive a business result Team:Operations Team label for Operations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants