From 46e43f4bde4a35785b4997b81e86cd19f046b69b Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 21 Dec 2021 16:52:28 +0100 Subject: Commit --- src/node_modules/has-symbols/test/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/node_modules/has-symbols/test/index.js (limited to 'src/node_modules/has-symbols/test/index.js') diff --git a/src/node_modules/has-symbols/test/index.js b/src/node_modules/has-symbols/test/index.js new file mode 100644 index 0000000..fc32aff --- /dev/null +++ b/src/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); -- cgit