demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/dunder-proto-1.0.1/test/get.js

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/dunder-proto-1.0.1/test/get.js
Status
scanned
Type
file
Name
get.js
Extension
.js
Programming language
JavaScript
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
1143 (1.1 KB)
MD5
a48da2228c123a3ceb6b36fb7a9ec203
SHA1
d6cfe0ded55a858c7ef5358fe0f377435e71133a
SHA256
cd6c3e2cc078652bac3005445b7d9f36108b61e67c4ced535307165cb2487a26
SHA512

      
    
SHA1_git
253f1838ef01e519179515bdec086f97d2bed7c0
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
get.js | 1.1 KB |

'use strict'; var test = require('tape'); var getDunderProto = require('../get'); test('getDunderProto', { skip: !getDunderProto }, function (t) { if (!getDunderProto) { throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal } // @ts-expect-error t['throws'](function () { getDunderProto(); }, TypeError, 'throws if no argument'); // @ts-expect-error t['throws'](function () { getDunderProto(undefined); }, TypeError, 'throws with undefined'); // @ts-expect-error t['throws'](function () { getDunderProto(null); }, TypeError, 'throws with null'); t.equal(getDunderProto({}), Object.prototype); t.equal(getDunderProto([]), Array.prototype); t.equal(getDunderProto(function () {}), Function.prototype); t.equal(getDunderProto(/./g), RegExp.prototype); t.equal(getDunderProto(42), Number.prototype); t.equal(getDunderProto(true), Boolean.prototype); t.equal(getDunderProto('foo'), String.prototype); t.end(); }); test('no dunder proto', { skip: !!getDunderProto }, function (t) { t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype'); t.end(); });
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript
pkg:npm/dunder-proto@1.0.1 mit JavaScript