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 11b3ee4 commit 872d352
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=11b3ee4 --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)
* \\[[\`fecf15458e\`](https://github.com/nodejs/changelog-maker/commit/fecf15458e)] - **(CVE-2024-22020)** **lib,esm**: handle bypass network-import via data: (RafaelGSS) [nodejs/node#55819](https://github.com/nodejs/node/pull/55819)
* \\[[\`11b3ee4432\`](https://github.com/nodejs/changelog-maker/commit/11b3ee4432)] - **(CVE-2024-36138)** **src**: handle permissive extension on cmd check (RafaelGSS) [nodejs/node#55819](https://github.com/nodejs/node/pull/55819)
`)
t.end()
})

0 comments on commit 872d352

Please sign in to comment.