diff --git a/.eslintrc b/.eslintrc index 136ac914a87..891bdfbe209 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,13 +1,13 @@ --- parser: babel-eslint +plugins: [ mocha ] + env: es6: true amd: true node: true mocha: true - browser: true - rules: block-scoped-var: 2 @@ -67,3 +67,5 @@ rules: valid-typeof: 2 wrap-iife: [ 2, outside ] yoda: 0 + mocha/no-exclusive-tests: 2 + mocha/handle-done-callback: 2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ebc2dfa31f1..90143a845cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,9 +13,19 @@ git clone https://github.com/elastic/elasticsearch-marvel.git && cd elasticsearc npm install ``` - Start it up - - Start Elasticsearch, with esvm `esvm --branch 2.1` or with traditionally `bin/elasticsearch`. - - Start up the mock Marvel agent with `gulp index` - - Start up the filesystem watching of Marvel code and syncing to Kibana's plugin directory with `gulp dev` - - Finally startup Kibana from that directory run `bin/kibana` - + - Start Elasticsearch, with esvm `esvm --branch ` or traditionally with `bin/elasticsearch`. + - Start up the mock Marvel agent with `gulp index`. + - Start up the filesystem watching of Marvel code and syncing to Kibana's plugin directory with `gulp dev`. + - Finally, startup Kibana by running `bin/kibana --dev` from the root of the Kibana project. - Check it out, navigate to your [Kibana App](http://localhost:5601) + +- Run tests +``` +gulp test +``` + +- Debug tests +Add a `debugger` line to create a breakpoint, and then: +``` +gulp sync && mocha debug --compilers js:babel/register /pathto/kibana/installedPlugins/marvel/pathto/__test__/testfile.js +```