Skip to content

Commit ce935fb

Browse files
committed
fix: updated based on PR comments
1 parent f741b90 commit ce935fb

File tree

5 files changed

+1489
-17
lines changed

5 files changed

+1489
-17
lines changed

tap-snapshots/test-snyk-to-html.test.ts-TAP.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,8 +2176,8 @@ exports[`test/snyk-to-html.test.ts TAP template output displays vulns in descend
21762176
<div class="source-panel">
21772177
<span>Scanned the following paths:</span>
21782178
<ul>
2179-
<li class="paths">./java-goof (maven)</li>
2180-
<li class="paths">./goof (npm)</li>
2179+
<li class="paths">./java-goof (maven)</li>
2180+
<li class="paths">./goof (npm)</li>
21812181
</ul>
21822182
</div>
21832183
@@ -6542,7 +6542,7 @@ exports[`test/snyk-to-html.test.ts TAP test snyk-to-html handles -a argument cor
65426542
<div class="source-panel">
65436543
<span>Scanned the following path:</span>
65446544
<ul>
6545-
<li class="paths">/path/to/npm-lockfile-with-vulns (npm)</li>
6545+
<li class="paths">/path/to/npm-lockfile-with-vulns/package-lock.json (npm)</li>
65466546
</ul>
65476547
</div>
65486548
@@ -7193,7 +7193,7 @@ exports[`test/snyk-to-html.test.ts TAP test snyk-to-html handles -s argument cor
71937193
<div class="source-panel">
71947194
<span>Scanned the following path:</span>
71957195
<ul>
7196-
<li class="paths">/path/to/npm-lockfile-with-vulns (npm)</li>
7196+
<li class="paths">/path/to/npm-lockfile-with-vulns/package-lock.json (npm)</li>
71977197
</ul>
71987198
</div>
71997199
@@ -8135,7 +8135,7 @@ exports[`test/snyk-to-html.test.ts TAP test snyk-to-html shows remediation & sum
81358135
<div class="source-panel">
81368136
<span>Scanned the following path:</span>
81378137
<ul>
8138-
<li class="paths">/Users/lili/www/snyk-fixtures/python-pip-app-with-vulns (pip)</li>
8138+
<li class="paths">/Users/lili/www/snyk-fixtures/python-pip-app-with-vulns/requirements.txt (pip)</li>
81398139
</ul>
81408140
</div>
81418141
@@ -8936,7 +8936,7 @@ exports[`test/snyk-to-html.test.ts TAP test snyk-to-html shows remediation with
89368936
<div class="source-panel">
89378937
<span>Scanned the following path:</span>
89388938
<ul>
8939-
<li class="paths">/Users/lili/www/snyk-fixtures/python-pip-app-with-vulns (pip)</li>
8939+
<li class="paths">/Users/lili/www/snyk-fixtures/python-pip-app-with-vulns/requirements.txt (pip)</li>
89408940
</ul>
89418941
</div>
89428942

template/test-report.header.hbs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@
2525
<span>Scanned the following paths:</span>
2626
<ul>
2727
{{#each paths}}
28-
{{#if_not_eq packageManager "nuget"}}
29-
<li class="paths">{{path}} ({{packageManager}})</li>
30-
{{else}}
31-
<li class="paths">{{path}}/{{displayTargetFile}} ({{packageManager}})</li>
32-
{{/if_not_eq}}
28+
<li class="paths">{{path}}{{#if displayTargetFile}}/{{displayTargetFile}}{{/if}} ({{packageManager}})</li>
3329
{{/each}}
3430
</ul>
3531
</div>
@@ -38,11 +34,7 @@
3834
<div class="source-panel">
3935
<span>Scanned the following path:</span>
4036
<ul>
41-
{{#if_not_eq packageManager "nuget"}}
42-
<li class="paths">{{path}} ({{packageManager}})</li>
43-
{{else}}
44-
<li class="paths">{{path}}/{{dislpayTargetFile}} ({{packageManager}})</li>
45-
{{/if_not_eq}}
37+
<li class="paths">{{path}}{{#if displayTargetFile}}/{{displayTargetFile}}{{/if}} ({{packageManager}})</li>
4638
</ul>
4739
</div>
4840
{{/if}}

test/fixtures/test-report-container-with-app-vulns.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,6 @@
12761276
"uniqueCount": 1,
12771277
"targetFile": "/bin/gobin",
12781278
"projectName": "mymod",
1279-
"displayTargetFile": "/bin/gobin",
12801279
"path": "vulnerable:latest"
12811280
}
12821281
]

0 commit comments

Comments
 (0)