Skip to content

Commit

Permalink
Minor inspect code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfcosta committed Dec 23, 2015
1 parent 650c612 commit 148dd72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions lib/chai/utils/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('...');
}
Expand Down Expand Up @@ -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) {
Expand Down
9 changes: 4 additions & 5 deletions test/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]'
Expand Down Expand Up @@ -427,7 +427,7 @@ describe('utilities', function () {
});
});

it('truncate long typedArray', function () {
it('truncate long TypedArray', function () {
chai.use(function (_chai, _) {

var arr = []
Expand All @@ -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);
}
});
});

Expand Down

0 comments on commit 148dd72

Please sign in to comment.