--- layout: home ---

Getting Started

First install foounit with npm:

$ npm install foounit


Then follow these steps to run tests...

In nodejs

Generate a sample suite in the spec directory:

$ foounit generate --target=node --dir=spec

Run the test:

$ node spec/suite.js

In the browser

Generate a sample suite in the spec directory:

$ foounit generate --target=browser --dir=spec

Start a web server in the directory where the suite was created:

$ foounit serve

Open a web browser at http://localhost:5057/spec/runner.html

Shared client and server code

Generate a sample suite in the spec directory:

$ foounit generate --target=browser,node --dir=spec
foounit is smart enough to know that when multiple environments are specified that it should create a shared directory for multi-environment testing

Run the tests for each environment by following the directions in the previous steps.