updated loggers to write the actual url

This commit is contained in:
Spencer Alger
2014-01-28 16:41:55 -07:00
parent a8e9645183
commit 513486f372
35 changed files with 211 additions and 147 deletions

View File

@ -0,0 +1,20 @@
describe('Random Selector', function () {
var randomSelector = require('../../../src/lib/selectors/random');
var _ = require('lodash');
var expect = require('expect.js');
it('chooses a selection by random', function () {
var log = { a: 0, b: 0, c: 0 };
var choices = _.keys(log);
_.times(1000, function () {
var choice = randomSelector(choices);
log[choice]++;
});
expect(_.filter(log, function (count) {
return count < 200 || count > 400;
})).to.have.length(0);
});
});