# grunt-testem-all

> Grunt task for testem.js

Latest version **0.2.1** (published 2016-02-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-testem-all
pnpm add grunt-testem-all
yarn add grunt-testem-all
bun add grunt-testem-all
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2016-02-22 |
| First published | 2015-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Poluektov Dmitriy |
| Maintainers | ashot |
| Keywords | gruntplugin, testem, testem.js, javascript testing |

## Links

- npm: https://www.npmjs.com/package/grunt-testem-all
- Repository: https://github.com/Ashot-KR/grunt-testem-all
- Issues: https://github.com/Ashot-KR/grunt-testem-all/issues
- npm.io page: https://npm.io/package/grunt-testem-all

## Dependencies (1)

- [testem](https://npm.io/package/testem.md) ^1.4.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2016-02-22
- 0.1.0 — 2015-07-28

## README

# grunt-testem-all

> Grunt task for testem.js

## Getting Started
This plugin requires Grunt `~0.4.5`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-testem-all --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-testem-all');
```

## The "testem" task

### Overview
In your project's Gruntfile, add a section named `testem` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  testem: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});
```

### Options
`grunt-testem-all` supports all Testem options. See [testem configuration reference](https://github.com/airportyh/testem/blob/master/docs/config_file.md).  
As testem configuration has all necessary options for files serving, you don't need to configure any grunt file mapping — all you need is `options` field in your targets.

### Running tasks
Tasks can be run with one of the optional flags:  
* `--dev` — run in `dev` mode (**default**)
* `--ci` — run in `ci` mode
* `--server` — run in `server` mode
* `--launchers` — show `launchers` list

#### Note on `--launchers`
It shows launchers based on specific options.  
`grunt testem --launchers` will show launchers list based on global options, `grunt testem:target --launchers` will show launchers list for specific target.

#### Options priority
Testem config files has higher priority.  
**Task options** does not overrides global options from config file, but adds absent properties.  
For example:
```js
// testem.json
{
    "framework": "mocha"
    "launch_in_dev": ["Chrome"]
}

// Gruntfile
testem: {
    options: {
        launch_in_dev: ["FireFox"],
        port: 3333
    }
    ...
}
```
In result `launch_in_dev` property will be `["Chrome"]`, but `port` options will be added.  

**If you have testem config file in root of your project, it will be used as global config, even if you don't provide a path to config in options**  



### Usage Examples
```js
grunt.initConfig({
    testem: {
        options: {
            launch_in_dev: ["Chrome"],
            framework: 'mocha'
        },
    component: {
        options: {
            test_page: 'test/test_page.html',
            src_files:[
                'test/component.test.js'
            ]
		}
    },
    anotherComponent: {
        // this options overrides global task options
        options: {
            launch_in_dev: ["FireFox"],

            test_page: 'test/another_test_page.html',
            src_files:[
                'test/anotherComponent.test.js'
            ]
		}
    }
  }
});
```
Run task
```
grunt testem:component // run component target in dev mode
grunt testem:anotherComponent --ci // run anotherComponent target in ci mode
```

---
_Source: https://npm.io/package/grunt-testem-all · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
