Skip to content

Commit fa5bc2e

Browse files
author
Jahed Ahmed
authoredAug 12, 2021
Merge pull request #2155 from snyk/chore/document-uselocalpackage
chore: document useLocalPackage
2 parents 01e348d + aed2812 commit fa5bc2e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎packages/snyk-protect/test/util/useLocalPackage.ts

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ type PackageJSON = {
99

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.