diff --git a/src/ui/public/vislib/__tests__/components/color.js b/src/ui/public/vislib/__tests__/components/color.js index 2048c8473fdf..8e5c56d90a1e 100644 --- a/src/ui/public/vislib/__tests__/components/color.js +++ b/src/ui/public/vislib/__tests__/components/color.js @@ -63,10 +63,8 @@ describe('Vislib Color Module Test Suite', function () { }).to.throwError(); }); - it( - 'should throw an error if array is not composed of numbers, strings, or ' + - 'undefined values', - function () { + context('when array is not composed of numbers, strings, or undefined values', function () { + it('should throw an error', function () { expect(function () { getColors(arrayOfObjects); }).to.throwError(); @@ -78,13 +76,11 @@ describe('Vislib Color Module Test Suite', function () { expect(function () { getColors(arrayOfNullValues); }).to.throwError(); - } - ); + }); + }); - it( - 'should not throw an error if input is an array of strings, numbers, or' + - ' undefined values', - function () { + context('when input is an array of strings, numbers, or undefined values', function () { + it('should not throw an error', function () { expect(function () { getColors(arr); }).to.not.throwError(); @@ -96,8 +92,8 @@ describe('Vislib Color Module Test Suite', function () { expect(function () { getColors(arrayOfUndefinedValues); }).to.not.throwError(); - } - ); + }); + }); it('should be a function', function () { expect(typeof getColors).to.be('function');