mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
add not about custom tests executiong to the readme/help
Original commit: elastic/kibana-plugin-helpers@139221e5a6
This commit is contained in:
parent
867ed91517
commit
0ee64597fb
2 changed files with 21 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
=========================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue