# testit

> Because the world needs a simpler testing framework

Latest version **3.1.0** (published 2019-01-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install testit
pnpm add testit
yarn add testit
bun add testit
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2019-01-16 |
| First published | 2013-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 24.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | ForbesLindesay |
| Maintainers | forbeslindesay, robloach |

## Links

- npm: https://www.npmjs.com/package/testit
- Repository: https://github.com/ForbesLindesay/testit
- Homepage: https://github.com/ForbesLindesay/testit#readme
- Issues: https://github.com/ForbesLindesay/testit/issues
- npm.io page: https://npm.io/package/testit

## Dependencies (6)

- [ms](https://npm.io/package/ms.md) ^2.1.1
- [chalk](https://npm.io/package/chalk.md) ^2.0.0
- [promise](https://npm.io/package/promise.md) ^8.0.1
- [wtfnode](https://npm.io/package/wtfnode.md) ^0.8.0
- [is-browser](https://npm.io/package/is-browser.md) ^2.0.1
- [test-result](https://npm.io/package/test-result.md) ^2.0.0

## Recent versions

- 3.1.0 (latest) — 2019-01-16
- 3.0.0 — 2017-07-20
- 2.1.4 — 2017-06-23
- 2.1.3 — 2016-12-31
- 2.1.2 — 2016-07-24
- 2.1.1 — 2016-07-24
- 2.1.0 — 2016-07-23
- 2.0.5 — 2016-03-18
- 2.0.4 — 2016-03-18
- 2.0.3 — 2016-03-06
- 2.0.2 — 2015-02-14
- 2.0.1 — 2015-02-13
- 2.0.0 — 2015-02-13
- 1.2.0 — 2013-11-11
- 1.1.0 — 2013-09-04
- … 1 more at https://npm.io/package/testit/versions

## README

# testit

Because the world needs a simpler testing framework.  Check out the travis build log for an example of test output and check out the test folder for an example test suite.

This module also works seamlessly with [istanbul](https://github.com/gotwarlost/istanbul) for code coverage (see package.json) and [sauce-test](https://github.com/ForbesLindesay/sauce-test) for browser testing via [browserify](http://browserify.org/).

[![Build Status](https://img.shields.io/travis/ForbesLindesay/testit/master.svg)](https://travis-ci.org/ForbesLindesay/testit)
[![Coverage Status](https://img.shields.io/coveralls/ForbesLindesay/testit/master.svg?style=flat)](https://coveralls.io/r/ForbesLindesay/testit?branch=master)
[![Dependency Status](https://img.shields.io/david/ForbesLindesay/testit.svg)](https://david-dm.org/ForbesLindesay/testit)
[![NPM version](https://img.shields.io/npm/v/testit.svg)](https://www.npmjs.com/package/testit)

[![Sauce Test Status](https://saucelabs.com/browser-matrix/testit.svg)](https://saucelabs.com/u/testit)

## Installation

    npm install testit

## Sample test script

```javascript
var assert = require('assert')
var test = require('testit')

test('synchronous tests', function () {
  test('passes tests that do not fail', function () {
    assert(true)
  })
  test('fails tests that fail', function () {
    assert(false)
  })
})

test('asynchronous tests with callbacks', function () {
  test('passes some async tests', function (done) {
    setTimeout(done, 100)
  })
  test('fails some async tests', function (done) {
    setTimeout(function () {
      done(new Error('oh dear'))
    }, 100)
  })
  test('times out some tests', function (done) {
    setTimeout(function () {
      done()
    }, 99999999999)
  })
  test('supports custom timeouts', function (done) {
    setTimeout(done, 1000)
  }, {timeout: '1 second'})
})
test('supports promises just as well as callbacks', function () {
  return new Promise(function (resolve) {
    setTimeout(resolve, 100)
  })
})
```

## License

  MIT

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