Skip to content

Commit 7c6e46b

Browse files
committed
test: add cveId tests
1 parent 12aa856 commit 7c6e46b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

commit-to-output.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function toStringMarkdown (data) {
9898
}
9999

100100
function toStringMessageOnly (data) {
101-
let cveData
101+
let cveData = ''
102102
if (data.cveId) {
103103
cveData = `${data.cveId} - `
104104
}

test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,13 @@ test('test find-matching-prs', (t) => {
142142
`)
143143
t.end()
144144
})
145+
146+
test('test group, CVE-ID', (t) => {
147+
t.equal(exec('--start-ref=v4.1.1 --end-ref=12aa856 --group --filter-release --markdown'),
148+
`* \\[[\`35b762c78a\`](https://github.com/nodejs/changelog-maker/commit/35b762c78a)] - chore(release): 4.1.1 \\[skip ci] (semantic-release-bot)
149+
* \\[[\`736a899e9c\`](https://github.com/nodejs/changelog-maker/commit/736a899e9c)] - **feat**: add cveId support to commmit output (RafaelGSS)
150+
* \\[[\`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)
151+
* \\[[\`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)
152+
`)
153+
t.end()
154+
})

0 commit comments

Comments
 (0)