hunk.code_window: import exists from 'path-exists'
   import sinon from 'sinon'
   import deepRequireCwd from 'deep-require-cwd'
   import { testDefaults } from '../utils'
   afterEach(async () => {
     // @ts-expect-error
     await global.finishWorkers?.()
   })
   test('successfully install optional dependency with subdependencies', async () => {
     prepareEmpty()
     await addDependenciesToPackage({}, ['fsevents@1.0.14'], await testDefaults({ targetDependenciesField: 'optionalDependencies' }))
   })
  
hunk.labels: keep keep keep keep keep replace replace replace replace replace keep keep keep keep keep
hunk.file_path: pkg-manager/core/test/install/optionalDependencies.ts
hunk.type: replace
file: link-workspace-packages = deep
  prefer-workspace-packages = true
  shared-workspace-lockfile = true
  save-workspace-protocol = rolling
  registry=http://localhost:4873
  