 
     apm.run(['list'])
     expect(console.log).toHaveBeenCalled()
-    expect(console.log.argsForCall[1][0]).toContain 'test-module@1.0.0'
+    expect(console.log.argsForCall[4][0]).toContain 'test-module@1.0.0'
 
   it 'labels disabled packages', ->
     packagesPath = path.join(atomHome, 'packages')

    atomHome = temp.mkdirSync('apm-home-dir-')
    process.env.ATOM_HOME = atomHome

  it 'lists the built-in packages', ->
    packagesPath = path.join(resourcePath, 'src', 'packages')
    fs.makeTreeSync(packagesPath)
    wrench.copyDirSyncRecursive(path.join(__dirname, 'fixtures', 'test-module'), path.join(packagesPath, 'test-module'))

    apm.run(['list'])
    expect(console.log).toHaveBeenCalled()
    expect(console.log.argsForCall[4][0]).toContain 'test-module@1.0.0'

  it 'lists the packages included in node_modules with an atom engine specified', ->
    packagesPath = path.join(resourcePath, 'node_modules')
    fs.makeTreeSync(packagesPath)


    apm.run(['list'])
    expect(console.log).toHaveBeenCalled()
    expect(console.log.argsForCall[4][0]).toContain 'test-module@1.0.0 (disabled)'
