Skip to content

Commit 538081c

Browse files
authored
fix(stringify): guard Symobl from IE (#3023)
1 parent 65b658a commit 538081c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

test/client/stringify.spec.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ var assert = require('assert')
44
var stringify = require('../../common/stringify')
55

66
describe('stringify', function () {
7-
it('should serialize symbols', function () {
8-
assert.deepEqual(stringify(Symbol.for('x')), 'Symbol(x)')
9-
})
7+
if (window && window.Symbol) {
8+
// IE does not support Symbol
9+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
10+
it('should serialize symbols', function () {
11+
assert.deepEqual(stringify(Symbol.for('x')), 'Symbol(x)')
12+
})
13+
}
1014

1115
it('should serialize string', function () {
1216
assert.deepEqual(stringify('aaa'), "'aaa'")

0 commit comments

Comments
 (0)