From e53421a57486bb5b6f94942c773f4feb47b07a04 Mon Sep 17 00:00:00 2001 From: johnjbarton Date: Mon, 28 May 2018 10:02:10 -0700 Subject: [PATCH] fix(stringify): guard Symobl from IE --- test/client/stringify.spec.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/client/stringify.spec.js b/test/client/stringify.spec.js index 19bceab4e..45a91c289 100644 --- a/test/client/stringify.spec.js +++ b/test/client/stringify.spec.js @@ -4,9 +4,13 @@ var assert = require('assert') var stringify = require('../../common/stringify') describe('stringify', function () { - it('should serialize symbols', function () { - assert.deepEqual(stringify(Symbol.for('x')), 'Symbol(x)') - }) + if (window && window.Symbol) { + // IE does not support Symbol + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol + it('should serialize symbols', function () { + assert.deepEqual(stringify(Symbol.for('x')), 'Symbol(x)') + }) + } it('should serialize string', function () { assert.deepEqual(stringify('aaa'), "'aaa'")