Skip to content

Commit

Permalink
Merge pull request #296 from snyk/test/adjust_test_to_no_name_pkg
Browse files Browse the repository at this point in the history
fix: remove check for package name and add tests
  • Loading branch information
yuliabaron committed Dec 11, 2018
2 parents 749f154 + 0f49301 commit b663d04
Show file tree
Hide file tree
Showing 9 changed files with 2,394 additions and 2,459 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@ local.log
tmp
.DS_Store
package-lock.json
!**/package-lock.json
5 changes: 0 additions & 5 deletions src/lib/snyk-test/npm/index.js
Expand Up @@ -75,11 +75,6 @@ function test(root, options) {
return pkg;
});
}).then((pkg) => {
// if there's no package name, let's get it from the root dir
if (!pkg.name) {
pkg.name = path.basename(path.resolve(root));
}

policyLocations = policyLocations.concat(pluckPolicies(pkg));
debug('policies found', policyLocations);
analytics.add('policies', policyLocations.length);
Expand Down

0 comments on commit b663d04

Please sign in to comment.