0.6.4 • Published 12 years ago

tbd v0.6.4

Weekly downloads
13
License
-
Repository
-
Last release
12 years ago

tbd - Test Data Builder

Have you ever needed to push out a bunch of data for testing your app? Maybe your backend services aren't ready but you want to build the UI for the expected data?

Well tbd to the rescue, tbd will allow you to quickly build up some data quickly and painlessly.

tbd is designed to work in both Node.js and in the browser so you can use it for any application you want.

Getting tbd

For Node.js:

npm install tbd

For the browser - grab the latest version from git.

Using tbd

Node.js

Basic usage:

var tbd = require('tbd');

var data = tbd.from({ hello: 'world' }).make(10);

console.log(data.length); //10

Tweaking properties:

var tbd = require('tbd');

var data = tbd.from({ hello: 'world' })
            .prop('hello').use(function() { return 'my value; }).done()
            .make(10);
            
console.log(data.length); //10

Browser

When using tbd in the browser it works exactly the same way, only you don't need the require statement (unless you want to use RequireJS).

Running the tests

There's a bunch of tests shipped which uses Jasmine so you can run them from node.js if you want:

node tests.js

License

MIT

0.6.4

12 years ago

0.6.1

12 years ago

0.6.0

12 years ago

0.5.0

12 years ago

0.1.0

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago