Skip to content

Commit

Permalink
fix: do not crash if features is set but empty
Browse files Browse the repository at this point in the history
  • Loading branch information
edd committed Aug 3, 2023
1 parent 1e2e5e0 commit c686903
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vegaprotocol/approbation",
"version": "4.5.0",
"version": "4.5.1",
"description": "Match Acceptance Criteria Codes with the tests that test them",
"engine": ">= 18",
"bin": "./bin/approbation.js",
Expand Down
2 changes: 1 addition & 1 deletion src/check-references.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function checkReferences (specsGlob, testsGlob, categoriesPath, ignoreGlob, feat
setCategories(specCategories)
// Features gather Acceptance Criteria across spec files or categories, and tally the numbers

if (featuresPath !== undefined) {
if (featuresPath !== undefined && featuresPath.length > 0) {
specFeatures = setFeatures(JSON.parse(fs.readFileSync(featuresPath)))
}

Expand Down

0 comments on commit c686903

Please sign in to comment.