## Members

<dl>
<dt><a href="#lint">lint</a> ??? <code><a href="#LintReport">Promise.&lt;LintReport&gt;</a></code></dt>
<dd><p>Load and return all configuration options.</p>
</dd>
<dt><a href="#unit">unit</a> ??? <code><a href="#KarmaServer">Promise.&lt;KarmaServer&gt;</a></code></dt>
<dd><p>Run unit tests with karma + webpack + jasmine.</p>
</dd>
</dl>

## Typedefs

<dl>
<dt><a href="#LintReport">LintReport</a> : <code>Object</code></dt>
<dd></dd>
<dt><a href="#ESLintResult">ESLintResult</a> : <code>Object</code></dt>
<dd></dd>
<dt><a href="#KarmaServer">KarmaServer</a></dt>
<dd></dd>
</dl>

<a name="lint"></a>

## lint ??? <code>[Promise.&lt;LintReport&gt;](#LintReport)</code>
Load and return all configuration options.

**Kind**: global variable  

| Param | Type | Description |
| --- | --- | --- |
| entries | <code>String</code> | Glob for files to lint |
| usageOptions | <code>Object</code> | Options object |
| usageOptions.format | <code>String</code> | Lint output format (defaults to stylish) |
| usageOptions.configFile | <code>String</code> | The configuration file to use |
| usageOptions.exclude | <code>Array.&lt;string&gt;</code> | Array of globs to exclude from linting  (default: @backbase/eslint-config-backbase). |

**Example**  
```javascript
import { lint } from '@bb-cli/bb-test';
lint().then(report => {
  if (report.errors.length) {
    console.log(`${report.errors.length} errors`);
  }
  console.log(report.output);
});
```
<a name="unit"></a>

## unit ??? <code>[Promise.&lt;KarmaServer&gt;](#KarmaServer)</code>
Run unit tests with karma + webpack + jasmine.

**Kind**: global variable  

| Param | Type | Description |
| --- | --- | --- |
| sourceDirs | <code>Array.&lt;String&gt;</code> | Array of source dirs to look for CXP items |
| options | <code>Object</code> | Options object |
| options.loadPrebuilt | <code>Array.&lt;string&gt;</code> | Array of names of items to load in the browser. |
| options.exclude | <code>Array.&lt;string&gt;</code> | Array of paths to exclude from packaging |
| options.excludeDefaults | <code>Boolean</code> | Exclude prebuilt defaults |
| options.browsers | <code>Array.&lt;String&gt;</code> | List of browsers to launch |
| options.coverage | <code>Array.&lt;String&gt;</code> | List of coverage reporters |
| options.watch | <code>Boolean</code> | Enable karma watching |
| options.format | <code>Array.&lt;String&gt;</code> | List of karma stdout output formats |
| options.buildDirs | <code>Array.&lt;String&gt;</code> | List of dirs to search for prebuilt dependencies |
| options.testPlugins | <code>Array.&lt;String&gt;</code> | List of test-plugins to load |
| options.buildPlugins | <code>Array.&lt;String&gt;</code> | List of build plugins to load |

**Example**  
```javascript
import { unit } from '@bb-cli/bb-test';
unit().then(karmaServer => {
  karmaServer.start(); // logging and output is done by karma.
});
```
<a name="LintReport"></a>

## LintReport : <code>Object</code>
**Kind**: global typedef  
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| output | <code>String</code> | Output from eslint formatter |
| errors | <code>[Array.&lt;ESLintResult&gt;](#ESLintResult)</code> | Errors from eslint |

<a name="ESLintResult"></a>

## ESLintResult : <code>Object</code>
**Kind**: global typedef  
**Example**  
```javascript
{
  filePath: "/Users/eslint/project/myfile.js",
  messages: [
    {
      ruleId: "semi",
      severity: 2,
      message: "Missing semicolon.",
      line: 1,
      column: 13,
      nodeType: "ExpressionStatement",
      source: "\"use strict\"", // Deprecated: see "please note" paragraph below.
      fix: { range: [12, 12], text: ";" }
    },
    {
      ruleId: "func-name-matching",
      severity: 2,
      message: "Function name `bar` should match variable name `foo`",
      line: 2,
      column: 5,
      nodeType: "VariableDeclarator",
      source: "var foo = function bar() {};"
    }
  ],
  errorCount: 1,
  warningCount: 0,
  output: "\"use strict\";\nvar foo = function bar() {};\nfoo();\n"
}
```
<a name="KarmaServer"></a>

## KarmaServer
**Kind**: global typedef  
**See**: http://karma-runner.github.io/1.0/dev/public-api.html  
