diff options
Diffstat (limited to 'node_modules/has-symbol-support-x/tests')
-rw-r--r-- | node_modules/has-symbol-support-x/tests/index.html | 34 | ||||
-rw-r--r-- | node_modules/has-symbol-support-x/tests/run.js | 25 | ||||
-rw-r--r-- | node_modules/has-symbol-support-x/tests/spec/test.js | 29 |
3 files changed, 88 insertions, 0 deletions
diff --git a/node_modules/has-symbol-support-x/tests/index.html b/node_modules/has-symbol-support-x/tests/index.html new file mode 100644 index 0000000..9c027d4 --- /dev/null +++ b/node_modules/has-symbol-support-x/tests/index.html @@ -0,0 +1,34 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8" /> + <title>Jasmine Spec Runner: has-symbol-support-x</title> + + <link rel="icon" href="http://jasmine.github.io/images/jasmine.ico" sizes="16x16"> + <link rel="icon" href="http://jasmine.github.io//images/jasmine_32x32.ico" sizes="32x32"> + + <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jasmine/1.3.1/jasmine.min.css"> + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.10/es5-shim.min.js"></script> + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.10/es5-sham.min.js"></script> + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script> + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.3/es6-shim.js"></script> + <script type="text/javascript" src="https://wzrd.in/standalone/es7-shim@latest"></script> + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jasmine/1.3.1/jasmine.min.js"></script> + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jasmine/1.3.1/jasmine-html.min.js"></script> + + <!-- include helper files here... --> + + <!-- include source files here... --> + <script src="../lib/has-symbol-support-x.min.js"></script> + + <!-- include spec files here... --> + <script src="spec/test.js"></script> + + <!-- run the tests --> + <script src="./run.js"></script> + +</head> + +<body> +</body> +</html> diff --git a/node_modules/has-symbol-support-x/tests/run.js b/node_modules/has-symbol-support-x/tests/run.js new file mode 100644 index 0000000..76efd69 --- /dev/null +++ b/node_modules/has-symbol-support-x/tests/run.js @@ -0,0 +1,25 @@ +/* global window, jasmine */ +/* eslint strict: 0 */ +(function () { + var jasmineEnv = jasmine.getEnv(); + jasmineEnv.updateInterval = 1000; + + var trivialReporter = new jasmine.TrivialReporter(); + + jasmineEnv.addReporter(trivialReporter); + + jasmineEnv.specFilter = function (spec) { + return trivialReporter.specFilter(spec); + }; + + var currentWindowOnload = window.onload; + var execJasmine = function () { + jasmineEnv.execute(); + }; + window.onload = function () { + if (currentWindowOnload) { + currentWindowOnload(); + } + execJasmine(); + }; +}()); diff --git a/node_modules/has-symbol-support-x/tests/spec/test.js b/node_modules/has-symbol-support-x/tests/spec/test.js new file mode 100644 index 0000000..0868973 --- /dev/null +++ b/node_modules/has-symbol-support-x/tests/spec/test.js @@ -0,0 +1,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); + }); +}); |