@samitouri / QOS-React-2 / commits / b95fbbe4a2

Silence tests unsupported in PhantomJS.

These tests can still be run in the browser using `grunt test --debug`. This is a repeat of 42f8d155f8f240c457c969ac683d8b25876708ee. For posterity, we do this because Phantom has a problem with Object.freeze and the test runner can't do __DEV__ right (because we get rid of that in the build step).

Paul O’Shannessy committed Mar 18, 2014 at 17:48 UTC b95fbbe4a27809d25d19e24cc8090128158efe58
1 file changed +6
src/vendor/immutable/__tests__/ImmutableObject-test.js
+6
@@ -141,6 +141,7 @@ describe('ImmutableObject', function() {
141 testDevAndProd(
142 'should create distinct object with shallow field insertion',
143 function() {
144 + if (window.callPhantom) return;
145 var beforeStructure = {
146 oldShallowField: {
147 deepField: {
@@ -172,6 +173,7 @@ describe('ImmutableObject', function() {
173 testDevAndProd(
174 'should create distinct object with shallow field mutation',
175 function() {
176 + if (window.callPhantom) return;
177 var beforeStructure = {
178 oldShallowField: {
179 deepField: {
@@ -197,6 +199,7 @@ describe('ImmutableObject', function() {
199
200 message = 'should create distinct object with deep field insertion';
201 testDevAndProd(message, function() {
202 + if (window.callPhantom) return;
203 var beforeStructure = {
204 oldShallowField: {
205 deepField: {
@@ -244,6 +247,7 @@ describe('ImmutableObject', function() {
247
248 message = 'should provide a setProperty interface as sugar for set()';
249 testDevAndProd(message, function() {
250 + if (window.callPhantom) return;
251 var beforeIO = new ImmutableObject({initialField: null});
252 var afterIO =
253 ImmutableObject.setProperty(beforeIO, 'anotherField', 'anotherValue');
@@ -256,6 +260,7 @@ describe('ImmutableObject', function() {
260
261 message = 'should recursively create distinct objects when deep copying';
262 testDevAndProd(message, function() {
263 + if (window.callPhantom) return;
264 var beforeIO = new ImmutableObject({
265 a: {b: 'b', c: {}, d: 'd', e: new ImmutableObject({f: 'f'}) }
266 });
@@ -271,6 +276,7 @@ describe('ImmutableObject', function() {
276 });
277
278 testDevAndProd('should deep copy member immutability', function() {
279 + if (window.callPhantom) return;
280 var beforeIO = new ImmutableObject({
281 a: {b: new ImmutableObject({c: 'c'}), e: {f: 'f'}}
282 });