Skip to content

Commit

Permalink
test: add cveId tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Nov 12, 2024
1 parent 12aa856 commit 7c6e46b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion commit-to-output.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function toStringMarkdown (data) {
}

function toStringMessageOnly (data) {
let cveData
let cveData = ''
if (data.cveId) {
cveData = `${data.cveId} - `
}
Expand Down
10 changes: 10 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,13 @@ test('test find-matching-prs', (t) => {
`)
t.end()
})

test('test group, CVE-ID', (t) => {
t.equal(exec('--start-ref=v4.1.1 --end-ref=12aa856 --group --filter-release --markdown'),
`* \\[[\`35b762c78a\`](https://github.com/nodejs/changelog-maker/commit/35b762c78a)] - chore(release): 4.1.1 \\[skip ci] (semantic-release-bot)
* \\[[\`736a899e9c\`](https://github.com/nodejs/changelog-maker/commit/736a899e9c)] - **feat**: add cveId support to commmit output (RafaelGSS)
* \\[[\`9af0bbb77f\`](https://github.com/nodejs/changelog-maker/commit/9af0bbb77f)] - **(CVE-2024-22020)** **lib,esm**: handle bypass network-import via data: (RafaelGSS) [nodejs-private/node-private#522](https://github.com/nodejs-private/node-private/pull/522)
* \\[[\`12aa8564c4\`](https://github.com/nodejs/changelog-maker/commit/12aa8564c4)] - **(CVE-2024-36138)** **src**: handle permissive extension on cmd check (RafaelGSS) [nodejs-private/node-private#596](https://github.com/nodejs-private/node-private/pull/596)
`)
t.end()
})

0 comments on commit 7c6e46b

Please sign in to comment.