Skip to content

Commit

Permalink
[Tests] use the preferred it/skip pattern for this strict mode test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 15, 2015
1 parent 00c1e97 commit 62a3d8f
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions tests/spec/s-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var hasStrictMode = (function () {

return !this;
}());
var ifHasStrictIt = hasStrictMode ? it : xit;

describe('Array', function () {
var testSubject;
Expand Down Expand Up @@ -123,17 +124,15 @@ describe('Array', function () {
expect(toStr.call(listArg)).toBe('[object String]');
});

if (hasStrictMode) {
it('does not autobox the content in strict mode', function () {
var context;
[1].forEach(function () {
'use strict';
ifHasStrictIt('does not autobox the content in strict mode', function () {
var context;
[1].forEach(function () {
'use strict';

context = this;
}, 'x');
expect(typeof context).toBe('string');
});
}
context = this;
}, 'x');
expect(typeof context).toBe('string');
});
});
describe('#some()', function () {
var actual, expected, numberOfRuns;
Expand Down

0 comments on commit 62a3d8f

Please sign in to comment.