chance-multiseed

1.0.0 • Public • Published

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);
});

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i chance-multiseed

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • nathanmacinnes