Skip to content

Commit

Permalink
chore: document useLocalPackage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jahed Ahmed committed Aug 11, 2021
1 parent 04d18cd commit aed2812
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 aed2812

Please sign in to comment.