hunk.code_window:   t.ok(proc.stderr.toString().indexOf('SyntaxError: Invalid regular expression: missing /') !== -1)
     t.equal(proc.status, 1)
   })
   test('ignore pnpmfile.js when --ignore-pnpmfile is used', async (t: tape.Test) => {
     const project = prepare(t)
  
hunk.labels: keep keep keep add keep keep keep
hunk.after_edit: test('fails when pnpmfile.js requires a non-existend module', async (t: tape.Test) => {
     const project = prepare(t)
     await fs.writeFile('pnpmfile.js', 'module.exports = require("./this-does-node-exist")', 'utf8')
     const proc = execPnpmSync('install', 'pkg-with-1-dep')
     t.ok(proc.stdout.toString().indexOf('Error during pnpmfile execution') !== -1)
     t.equal(proc.status, 1)
   })
  
hunk.file_path: packages/pnpm/test/install/hooks.ts
hunk.type: add
file: import path = require('path')
  import exists = require('path-exists')
  import {install, installPkgs} from 'supi'
  import tape = require('tape')
  import promisifyTape from 'tape-promise'
  import {
    addDistTag,
    prepare,
    testDefaults,
  } from './utils'
  
  const test = promisifyTape(tape)
  
  test('should fail to update when requests are cached', async (t) => {
    const project = prepare(t)
  
    const metaCache = new Map()
  
    await addDistTag('dep-of-pkg-with-1-dep', '100.0.0', 'latest')
  
    await installPkgs(['pkg-with-1-dep'], await testDefaults({save: true, metaCache}))
  
    await project.storeHas('dep-of-pkg-with-1-dep', '100.0.0')
  
    await addDistTag('dep-of-pkg-with-1-dep', '100.1.0', 'latest')
  
    await install(await testDefaults({depth: 1, metaCache, update: true}))
  
    await project.storeHas('dep-of-pkg-with-1-dep', '100.0.0')
  })
  
  test('should not cache when cache is not used', async (t: tape.Test) => {
    const project = prepare(t)
  
    await addDistTag('dep-of-pkg-with-1-dep', '100.0.0', 'latest')
  
    await installPkgs(['pkg-with-1-dep'], await testDefaults({save: true}))
  
    await project.storeHas('dep-of-pkg-with-1-dep', '100.0.0')
  
    await addDistTag('dep-of-pkg-with-1-dep', '100.1.0', 'latest')
  
    await install(await testDefaults({depth: 1, update: true}))
  
    await project.storeHas('dep-of-pkg-with-1-dep', '100.1.0')
  })
  