diff --git a/packages/kbn-plugin-helpers/tasks/test/browser/README.md b/packages/kbn-plugin-helpers/tasks/test/browser/README.md index 865d85fbbe15..b2ef9ba0d999 100644 --- a/packages/kbn-plugin-helpers/tasks/test/browser/README.md +++ b/packages/kbn-plugin-helpers/tasks/test/browser/README.md @@ -21,9 +21,18 @@ Browser tests are written just like server tests, they are just executed differe starting the test runner ======================== -Under the covers this command uses the `test:dev` task from kibana. This task sets-up -a test runner that will watch your code for changes and rebuild your tests when necessary. -You access the test runner through a browser that it starts itself (via Karma). +Under the covers this command uses the `test:browser` task from kibana. This will execute +your tasks once and exit when complete. + +When run with the `--dev` option, the command uses the `test:dev` task from kibana. +This task sets-up a test runner that will watch your code for changes and rebuild your +tests when necessary. You access the test runner through a browser that it starts itself +(via Karma). + +If your plugin consists of a number of internal plugins, you may wish to keep the tests +isolated to a specific plugin or plugins, instead of executing all of the tests. To do this, +use `--plugins` and passing the plugins you would like to test. Muliple plugins can be +specified by separating them with commas. running the tests diff --git a/packages/kbn-plugin-helpers/tasks/test/server/README.md b/packages/kbn-plugin-helpers/tasks/test/server/README.md index f049b2138e09..9648ce49e747 100644 --- a/packages/kbn-plugin-helpers/tasks/test/server/README.md +++ b/packages/kbn-plugin-helpers/tasks/test/server/README.md @@ -23,6 +23,15 @@ running the tests Running the server tests is simple, just execute `npm run test:server` in your terminal and all of the tests in your server will be run. +By default, the runner will look for tests in `server/**/__tests__/**/*.js`. If you'd prefer to +use a different collection of globs and files, you can specify them after the `npm run test:server` +task, like so: + +`npm run test:server 'plugins/myplugins/server/__tests__/**/*.js'` + +NOTE: quoting the glob pattern is not required, but helps to avoid issues with globbing expansion +in your shell. + focus on the task at hand =========================