node-async-testing

Simple, intuitive testing for node.js

Overview:

node-async-testing is a fast, extendable uniting testing module for Node.js. It...

Page outline:

node-async-testing's biases opinions:

Node is asynchronous, so testing should be too

This applies to everything: assertions, errors, callbacks, setup, teardown, reports, and so on.

You should be able to run tests in parallel or serially

Running tests in parallel is much faster, but makes it impossible to accurately deal with errors.

You should be able to test any code, and all aspects of it

Make no assumptions about the code being tested.

You shouldn't have to learn new assertion functions

The assertion module that comes with Node is great. If you are familiar with it you won't have any problems, so no need to learn new functions (though you can add your own if you want).

No specifications, and no natural language suites

Not another Behavior Driven Development testing framework. I don't like specifications and what not. They only add verbosity. "Text X" followed by a function is just right.

Test files should be executable by Node

No preprocessors or custom scripts. If your test file is called my_test_file.js then node my_test_file.js should run it.

Installing:

With npm:

npm install async_testing

By hand:

mkdir -p ~/.node_libraries
cd ~/.node_libraries
git clone --recursive git://github.com/bentomas/node-async-testing.git async_testing

Getting the source, Getting involved and Getting in touch:

The source code for node-async-testing is located on GitHub. Feel free to send me pull requests, or report any issues you find. If you are looking for something to do, I maintain a list of things that need to be done or things I am thinking about doing.

To get in contact with me directly, you can send me a message on GitHub or send me an email. Sometimes I can be an awful correspondent, so don't take it personally. My best friends get the same treatment. I will eventually get back to you, just sometimes it can take months. A little prodding every now and then can't hurt.

Where to start:

Read about writing tests and suites or how to run your suites.

Check out the examples. I recommend looking at test/test-overview.js first.

Watch this brief screencast: