# grunt-testem

> A grunt plugin for testem.

Latest version **0.5.5** (published 2014-09-08) · 0 weekly downloads

## Install

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

Provides the command `grunt-testem`.

## 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.5.5 |
| Published | 2014-09-08 |
| First published | 2012-08-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.10 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 42 |
| Author | sideroad |
| Maintainers | sideroad |
| Keywords | gruntplugin, grunt, grunt, testem |

## Links

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

## Dependencies (3)

- [async](https://npm.io/package/async.md) ~0.9.0
- [underscore](https://npm.io/package/underscore.md) ~1.6.0
- [testem-multi](https://npm.io/package/testem-multi.md) ^0.4.4

## Recent versions

- 0.5.5 (latest) — 2014-09-08
- 0.5.4 — 2014-08-23
- 0.5.3 — 2014-07-17
- 0.5.2 — 2014-04-02
- 0.5.1 — 2014-01-15
- 0.5.0 — 2014-01-08
- 0.4.0 — 2013-09-26
- 0.3.6 — 2013-06-29
- 0.3.5 — 2013-06-06
- 0.3.4 — 2013-06-01
- 0.3.3 — 2013-04-05
- 0.3.2 — 2013-03-26
- 0.2.5 — 2013-03-14
- 0.3.1 — 2013-02-21
- 0.3.0 — 2013-02-21
- … 19 more at https://npm.io/package/grunt-testem/versions

## README

# grunt-testem[![Build Status](https://api.travis-ci.org/sideroad/grunt-testem.png?branch=master)](https://travis-ci.org/sideroad/grunt-testem)

>Execute [testem](https://github.com/airportyh/testem) with [Continuous Integration Mode](https://github.com/airportyh/testem#continuous-integration-mode) then generate TAP file as test results.

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

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 -g testem grunt-cli
npm install grunt-testem --save-dev
```

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

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

## 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 : {
      launch_in_ci : [
        'firefox',
        'safari'
      ]
    },
    main : {
      src: [ 'examples/*.html' ],
      dest: 'tests.tap'
    }
  }
});
```

#### src
src property be able to set `test_page` html path as testem option or `testem.json` path

#### dest
TAP file path

### Options
See also [Configuration File](https://github.com/airportyh/testem#configuration-file)

It also accepts:

* `output.coverage` that is the folder path where coverage reports are written.

```js
grunt.initConfig({
  'testem': {
    options : {
      output: {
        coverage : 'coverage-results/'
      }
    },
    main : {
      src: [ 'examples/*.html' ],
      dest: 'tests.tap'
    }
  }
});
```

Source files must be instrumented before running tests. An example on how to do it in grunt is available inside `examples/coverage`.


* `options.bailOut` if `true`, when a test fails, all remaining tests won't run (default `false`)

```js
grunt.initConfig({
  'testem': {
    options : {
      bailOut: true
    },
    main : {
      src: [ 'examples/*.html' ],
      dest: 'tests.tap'
    }
  }
});
```

This option speeds up the test execution in case of errors.

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