Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Project DEAD.
JavaScript
Tree: 5d161feecf

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc
example
src
test
.gitignore
LISENSE
Makefile
README.mkd
package.json

README.mkd

REimplementing Unit Test

Simply another unit test framework for node.js

Design

  • Tries to support async tests
  • Saves typing
  • No scope or object shall be cluttered
  • NO huge object literals or 7-level indentation
  • Keeps a "right" design internally (which you won't see)

Features

Implemented

  • Extended assertion method
  • Ensure callback's called and event's fired
  • Set timeout for tests
  • A better-than-nothing command line test runner
  • Multiple asynchronous setup/teardown
  • Suite-wise startup/shutdown (multiple & async, too)

(Not So) Near Future

  • Simple mocking support
  • Colorful reporting
  • Nested test suites
  • Watch mode?
  • Tagged tests and/or suites
  • Custom running policy for skipping/picking tests
  • Custom test result reporter (after the internal API stablized)
  • Any crazy idea(s)

Installation

By using npm:

$ npm install reut

Install from repo:

$ cp -r src ~/.node_libraries/reut
# Assuming ~/bin is in your $PATH
$ ln -s ~/.node_libraries/reut/bin/cli.js ~/bin/reut

Usage

$ cat <<EOF >hello.js
var reut = require("reut")
reut.test("Say hello in Chinese!", function(test) {
  test.ok(true, "你好")
})
EOF
# And here we go
$ reut hello.js

Document doc/api.mkd sucks. See example/* instead.

Something went wrong with that request. Please try again.