1.0.0 • Published 9 years ago

chance-multiseed v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

chance-multiseed

A simple wrapper around chance for testing. Allows multiple seeds, strings or numbers. I use this in my tests like this:

var cm = require("chance-multiseed");

var masterKey = 12345,
    random;

beforeEach(function () {
    random = cm(masterKey, this.currentTest.title);
});

it("always returns 4", function () {
    var result = myFunction(random.string());
    assert.equal(result, 4);
});
1.0.0

9 years ago