Skip to content

Commit 62a3d8f

Browse files
committed
[Tests] use the preferred it/skip pattern for this strict mode test.
1 parent 00c1e97 commit 62a3d8f

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

tests/spec/s-array.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var hasStrictMode = (function () {
99

1010
return !this;
1111
}());
12+
var ifHasStrictIt = hasStrictMode ? it : xit;
1213

1314
describe('Array', function () {
1415
var testSubject;
@@ -123,17 +124,15 @@ describe('Array', function () {
123124
expect(toStr.call(listArg)).toBe('[object String]');
124125
});
125126

126-
if (hasStrictMode) {
127-
it('does not autobox the content in strict mode', function () {
128-
var context;
129-
[1].forEach(function () {
130-
'use strict';
127+
ifHasStrictIt('does not autobox the content in strict mode', function () {
128+
var context;
129+
[1].forEach(function () {
130+
'use strict';
131131

132-
context = this;
133-
}, 'x');
134-
expect(typeof context).toBe('string');
135-
});
136-
}
132+
context = this;
133+
}, 'x');
134+
expect(typeof context).toBe('string');
135+
});
137136
});
138137
describe('#some()', function () {
139138
var actual, expected, numberOfRuns;

0 commit comments

Comments
 (0)