# foounit

> Cross environment BDD test framework

Latest version **0.1.2** (published 2012-01-24) · 0 weekly downloads

## Install

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

Provides the command `foounit`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2012-01-24 |
| First published | 2011-05-16 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Bob Remeika |
| Maintainers | foobarfighter |

## Links

- npm: https://www.npmjs.com/package/foounit
- Repository: https://github.com/foobarfighter/foounit
- npm.io page: https://npm.io/package/foounit

## Dependencies (4)

- [fsh](https://npm.io/package/fsh.md) =0.0.2
- [nomnom](https://npm.io/package/nomnom.md) =1.5.1
- [connect](https://npm.io/package/connect.md) =1.8.5
- [underscore](https://npm.io/package/underscore.md)

## Recent versions

- 0.1.2 (latest) — 2012-01-24
- 0.1.1 — 2012-01-24
- 0.1.0 — 2011-06-21
- 0.0.7 — 2011-06-13
- 0.0.6 — 2011-06-08
- 0.0.5 — 2011-06-07
- 0.0.4 — 2011-05-19
- 0.0.3 — 2011-05-18
- 0.0.2 — 2011-05-17
- 0.0.1 — 2011-05-16

## README

# foounit ![Project status](http://stillmaintained.com/foobarfighter/foounit.png)

A functionally scoped BDD style test framework that runs everywhere.

### Key features:

* Asyncronous test running
* Out of the box support for multiple javascript host environments: node.js, major browsers, Adobe AIR, The Ruby Racer
* BDD style test running
* A simple API

### Contrived Example
    var MyLib = foounit.require(':src/my_lib');

    foounit.add(function (kw){ with(kw){
      describe('when something happens', function (){
        var myLib;
        before(function (){
          myLib = new MyLib();
        });

        it('does something awesome', function (){
          expect(myLib.someFunc()).to(equal, 'foo');
        });
      });
    }});

## Quick Start Guide

### Quick Start for Browser Testing
1. Create a directory to put your tests
2. Drop in the example suite
3. Start a web server
4. Point your web browser at your server location

### Quick Start for Node Testing
1. TODO

### Quick Start for Shared Environment Testing
1. TODO

## Do we run everywhere yet? - NO

### Browser
* Firefox
  * Firefox 3.x - YES
  * Firefox 4.x - YES
* Chrome - YES
* Safari - YES
* Internet Explorer
  * IE6 - YES
  * IE7 - YES
  * IE8 - YES
  * IE9 - ?

### Comand line
* Node.js - YES
* Rhino - NO
* spidermonkey - ??

### Other
* Adobe AIR - NO
* The Ruby Racer - NO
* Webkit Mobile - NO

## Known Issues
* Stack trace reporting in the browser doesn't really help that much.
* XhrLoadingStrategy is not good enough.  We lose stack trace info in the eval.
* The UI for browser based running is not where I want it to be yet.

## About
TODO

## Other Alternatives

### foounit isn't for you?
There's a lot of great unit testing frameworks for javascript these days.  It's more important that people are testing their code than it is that people use foounit.

Some notable alternatives are:

* jasmine    (This is also a rewrite of Screw Unit)
* shoulda.js (BDD with different syntax)
* vows       (BDD with different syntax)
* logan      (Cross environment unit testing)

## Greetz
* mde - for providing good ideas
* peterbraden - for identifying problems with foounit's first iteration
* nathansobo - for rewriting Screw Unit while I was at Grockit which got me this far
* Alex Russell and James Burke - for being a sounding board for synchronous loader ideas
* jasmine for beating me to the punch :) and also providing a better API than I originally had

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