From aa773172311dcada759dfbaac485f4bc6e00bc21 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 14 Oct 2023 15:31:11 +0800 Subject: added babel --- node_modules/has/test/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 node_modules/has/test/index.js (limited to 'node_modules/has/test') diff --git a/node_modules/has/test/index.js b/node_modules/has/test/index.js new file mode 100644 index 00000000..876aad91 --- /dev/null +++ b/node_modules/has/test/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var test = require('tape'); +var has = require('../'); + +test('has', function (t) { + t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); + t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); + t['throws'](function () { + has(null, 'throws'); + }, TypeError, 'calling has on null throws TypeError'); + t['throws'](function () { + has(void 0, 'throws'); + }, TypeError, 'calling has on undefined throws TypeError'); + t.end(); +}); -- cgit v1.2.3