Skip to content

[test] consolidate top level npm scripts #41133

Description

@jbudz

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

Activity

  1. elasticmachine commented on Jul 15, 2019

    @elasticmachine
    Contributor

    Pinging @elastic/kibana-operations

  2. added 2 commits that reference this issue on Jan 27, 2020
    f5cf389
    c92b887
  3. added 2 commits that reference this issue on Feb 18, 2020
    76d475a
    a2716cc
  4. added a commit that references this issue on May 15, 2020
    f455d6a
  5. added a commit that references this issue on May 6, 2026
    0f58ee7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Team:OperationsKibana-Operations TeamchoreenhancementNew value added to drive a business result

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions