Skip to content

Commit

Permalink
Merge pull request #2155 from snyk/chore/document-uselocalpackage
Browse files Browse the repository at this point in the history
chore: document useLocalPackage
  • Loading branch information
Jahed Ahmed committed Aug 12, 2021
2 parents 01e348d + aed2812 commit fa5bc2e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/snyk-protect/test/util/useLocalPackage.ts
Expand Up @@ -9,6 +9,13 @@ type PackageJSON = {

const debug = debuglog('@snyk' + __filename);

/**
* Modifies the given fixture's package.json to use a locally built
* @snyk/protect tarball instead of the one in NPM Registry.
*
* Typically used via `createProject` to automatically switch between
* dev and prod testing.
*/
const useLocalPackage = async (projectPath: string) => {
const workspaceRoot = path.resolve(__dirname, '../..');
const { stdout: tarballName } = await runCommand('npm', ['pack'], {
Expand Down

0 comments on commit fa5bc2e

Please sign in to comment.