From 62a3d8fcb8379d8ff498b95bb1fb01cc986161bd Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 15 Nov 2015 14:34:37 -0800 Subject: [PATCH] [Tests] use the preferred it/skip pattern for this strict mode test. --- tests/spec/s-array.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/spec/s-array.js b/tests/spec/s-array.js index f128d943..6077b127 100644 --- a/tests/spec/s-array.js +++ b/tests/spec/s-array.js @@ -9,6 +9,7 @@ var hasStrictMode = (function () { return !this; }()); +var ifHasStrictIt = hasStrictMode ? it : xit; describe('Array', function () { var testSubject; @@ -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;