How to use the github.com/zkochan/install-scripts-example/2de638b8b572cd1e87b74f4540754145fb2c0ebb function in github

To help you get started, we’ve selected a few github examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pnpm / pnpm / test / install / lifecycleScripts.ts View on Github external
test('run prepare script for git-hosted dependencies', async (t: tape.Test) => {
  const project = prepare(t)

  await installPkgs(['zkochan/install-scripts-example#prepare'], await testDefaults())

  const scripts = project.requireModule('install-scripts-example-for-pnpm/output.json')
  t.equal(scripts[0], 'preinstall')
  t.equal(scripts[1], 'install')
  t.equal(scripts[2], 'postinstall')
  t.equal(scripts[3], 'prepare')

  const shr = await project.loadShrinkwrap()
  t.ok(shr.packages['github.com/zkochan/install-scripts-example/2de638b8b572cd1e87b74f4540754145fb2c0ebb'].prepare === true, 'prepare field added to shrinkwrap.yaml')
})