Skip to content

Commit de09415

Browse files
feat: add test on empty objects
1 parent 247b542 commit de09415

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/csaf_2_1/recommendedTest_6_2_25.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,25 @@ describe('recommendedTest_6_2_25', function () {
99
0
1010
)
1111
})
12+
it('skips empty objects', async function () {
13+
assert.equal(
14+
(
15+
await recommendedTest_6_2_25({
16+
vulnerabilities: [
17+
{
18+
cwes: [
19+
{
20+
id: 'CWE-20',
21+
name: 'Improper Input Validation',
22+
version: '4.13',
23+
},
24+
],
25+
},
26+
{}, // should be ignored
27+
],
28+
})
29+
).warnings.length,
30+
1
31+
)
32+
})
1233
})

0 commit comments

Comments
 (0)