Use standard and prettier (#10)

* switch from custom eslint config to standard + prettier

* fix new standard eslint violations

* add editorconfig file

* auto-fix all other violations

* update lint yarn script

* remove jshint comment
This commit is contained in:
Spencer
2019-07-09 13:24:13 -07:00
committed by GitHub
parent f69840c50f
commit 7c1573fb07
119 changed files with 4506 additions and 3521 deletions

View File

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