%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
'use strict'; const common = require('../common'); const assert = require('assert'); const path = require('path'); const util = require('util'); const message = 'message'; const testFunction1 = common.mustNotCall(message); const testFunction2 = common.mustNotCall(message); const createValidate = (line, args = []) => common.mustCall((e) => { const prefix = `${message} at `; assert.ok(e.message.startsWith(prefix)); if (process.platform === 'win32') { e.message = e.message.substring(2); // remove 'C:' } const msg = e.message.substring(prefix.length); const firstColon = msg.indexOf(':'); const fileName = msg.substring(0, firstColon); const rest = msg.substring(firstColon + 1); assert.strictEqual(path.basename(fileName), 'test-common-must-not-call.js'); const argsInfo = args.length > 0 ? `\ncalled with arguments: ${args.map(util.inspect).join(', ')}` : ''; assert.strictEqual(rest, line + argsInfo); }); const validate1 = createValidate('9'); try { testFunction1(); } catch (e) { validate1(e); } const validate2 = createValidate('11', ['hello', 42]); try { testFunction2('hello', 42); } catch (e) { validate2(e); } assert.throws( () => new Proxy({ prop: Symbol() }, { get: common.mustNotCall() }).prop, { code: 'ERR_ASSERTION' } ); { const { inspect } = util; delete util.inspect; assert.throws( () => common.mustNotCall()(null), { code: 'ERR_ASSERTION' } ); util.inspect = inspect; }