Skip to content

Commit

Permalink
fix(stringify): guard Symobl from IE (#3023)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjbarton authored May 29, 2018
1 parent 65b658a commit 538081c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/client/stringify.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'")
Expand Down

0 comments on commit 538081c

Please sign in to comment.