hunk.code_window:   await install(testDefaults())
     await project.hasNot('not-compatible-with-any-os')
     await project.storeHasNot('not-compatible-with-any-os', '1.0.0')
     t.notOk(await exists(path.resolve('node_modules', '.localhost+4873', 'dep-of-optional-pkg', '1.0.0')), "isn't linked into node_modules")
     const shr = await project.loadShrinkwrap()
     t.ok(shr.packages['/not-compatible-with-any-os/1.0.0'], 'shrinkwrap contains optional dependency')
     t.ok(shr.packages['/dep-of-optional-pkg/1.0.0'], 'shrinkwrap contains dependency of optional dependency')
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:   await project.storeHas('not-compatible-with-any-os', '1.0.0')
  
hunk.file_path: test/install/optionalDependencies.ts
hunk.type: replace
file: import isexe = require('isexe')
  import fs = require('mz/fs')
  import {Test} from 'tape'
  import semver = require('semver')
  import {Stats} from 'fs'
  import isWindows = require('is-windows')
  
  const IS_WINDOWS = isWindows()
  
  export default async function isExecutable (t: Test, filePath: string) {
    if (IS_WINDOWS) {
      t.ok(isexe(filePath), `${filePath} is executable`)
      return
    }
  
    const stat = await fs.stat(filePath)
    t.equal(stat.mode, parseInt('100755', 8), `${filePath} is executable`)
    t.ok(stat.isFile(), `${filePath} refers to a file`)
    return
  }
  