Files
elasticsearch-js/test/unit/specs/round_robin_selector.js
Spencer 7c1573fb07 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
2019-07-09 13:24:13 -07:00

18 lines
483 B
JavaScript

describe('Round Robin Selector', function() {
var selector = require('../../../src/lib/selectors/round_robin');
var _ = require('lodash');
var expect = require('expect.js');
it('chooses options in order', function() {
var options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0];
var expected = _.clone(options);
var selections = [];
_.times(options.length, function() {
selections.push(selector(options));
});
expect(selections).to.eql(expected);
});
});