aboutsummaryrefslogtreecommitdiff
path: root/node_modules/has-symbol-support-x/tests/spec/test.js
blob: 08689734a6b5dfcf5ad66f7b0a3e5913a3fc03ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
'use strict';

var hasSymbolSupport;
if (typeof module === 'object' && module.exports) {
  require('es5-shim');
  require('es5-shim/es5-sham');
  if (typeof JSON === 'undefined') {
    JSON = {};
  }
  require('json3').runInContext(null, JSON);
  require('es6-shim');
  var es7 = require('es7-shim');
  Object.keys(es7).forEach(function (key) {
    var obj = es7[key];
    if (typeof obj.shim === 'function') {
      obj.shim();
    }
  });
  hasSymbolSupport = require('../../index.js');
} else {
  hasSymbolSupport = returnExports;
}

describe('Basic tests', function () {
  it('results should match', function () {
    var expected = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
    expect(hasSymbolSupport).toBe(expected);
  });
});