chore: cleaning out unused code from utils (#11076)

* removing unused stuff (and some jquery) from utils.js

* linting
This commit is contained in:
Evan Rusackas
2020-09-27 20:08:05 -07:00
committed by GitHub
parent 7f1e4e441d
commit cff034e2cf
11 changed files with 19 additions and 70 deletions

View File

@@ -16,25 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
import { formatSelectOptionsForRange, mainMetric } from 'src/modules/utils';
import { mainMetric } from 'src/modules/utils';
describe('utils', () => {
describe('formatSelectOptionsForRange', () => {
it('returns an array of arrays for the range specified (inclusive)', () => {
expect(formatSelectOptionsForRange(0, 4)).toEqual([
[0, '0'],
[1, '1'],
[2, '2'],
[3, '3'],
[4, '4'],
]);
expect(formatSelectOptionsForRange(1, 2)).toEqual([
[1, '1'],
[2, '2'],
]);
});
});
describe('mainMetric', () => {
it('is null when no options', () => {
expect(mainMetric([])).toBeUndefined();