HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/douven.komma.pro/node_modules/npm/test/tap/00-verify-ls-ok.js
var common = require('../common-tap')
var test = require('tap').test
var path = require('path')
var cwd = path.resolve(__dirname, '..', '..')
var fs = require('fs')

test('npm ls in npm', function (t) {
  t.ok(fs.existsSync(cwd), 'ensure that the path we are calling ls within exists')
  var files = fs.readdirSync(cwd)
  t.notEqual(files.length, 0, 'ensure there are files in the directory we are to ls')

  var opt = { cwd: cwd, stdio: [ 'ignore', 'ignore', 2 ] }
  common.npm(['ls'], opt, function (err, code) {
    t.ifError(err, 'error should not exist')
    t.equal(code, 0, 'npm ls exited with code')
    t.end()
  })
})