From 148dd7269557dbff33d56081054ad12b2393c0e4 Mon Sep 17 00:00:00 2001 From: lucasfcosta Date: Tue, 22 Dec 2015 23:23:30 -0200 Subject: [PATCH] Minor inspect code style fixes --- lib/chai/utils/inspect.js | 5 ++--- test/utilities.js | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/chai/utils/inspect.js b/lib/chai/utils/inspect.js index 0a5003684..4c2d152a2 100644 --- a/lib/chai/utils/inspect.js +++ b/lib/chai/utils/inspect.js @@ -258,7 +258,7 @@ function formatTypedArray(ctx, value, recurseTimes, visibleKeys, keys) { } } - // If TypedArray has been truncated we add '...' to it's end + // If TypedArray has been truncated we add '...' to its end if (l !== value.length) { output.push('...'); } @@ -358,8 +358,7 @@ function isTypedArray(ar) { objectToString(ar) === '[object Int32Array]' || objectToString(ar) === '[object Uint32Array]' || objectToString(ar) === '[object Float32Array]' || - objectToString(ar) === '[object Float64Array]' - ) + objectToString(ar) === '[object Float64Array]'); } function isArray(ar) { diff --git a/test/utilities.js b/test/utilities.js index 5a7b64865..2fd6b53cb 100644 --- a/test/utilities.js +++ b/test/utilities.js @@ -391,7 +391,7 @@ describe('utilities', function () { }); }); - it('inspect typedArray conversion', function () { + it('inspect every kind of available TypedArray', function () { chai.use(function (_chai, _) { var arr = [1, 2, 3] , exp = '[ 1, 2, 3 ]' @@ -427,7 +427,7 @@ describe('utilities', function () { }); }); - it('truncate long typedArray', function () { + it('truncate long TypedArray', function () { chai.use(function (_chai, _) { var arr = [] @@ -445,9 +445,8 @@ describe('utilities', function () { if ((!isNode && 'Int8Array' in window) || isNode && typeof 'Int8Array' !== undefined) { - - expect(_.inspect(new Int8Array(arr))).to.equal(exp); - } + expect(_.inspect(new Int8Array(arr))).to.equal(exp); + } }); });