Skip to content

Commit

Permalink
[#1] fix unit test crash
Browse files Browse the repository at this point in the history
  • Loading branch information
feelform committed Nov 9, 2021
1 parent b301c79 commit b5824d2
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ const ReleaseNotes = require('../lib/release-notes')

test('tagname check with "v"', async (t) => {
const actual = (await ReleaseNotes.makeLatestReleaseNotes({
latest: function () {
return {
tag_name: 'v1.0',
body: ''
}
getTagName: function () {
return 'v1.0'
},
getBody: function () {
return ''
}
})).contents
t.true(/# What's New in v1.0/.test(actual), '`# What"s New in tagname with "v"')
Expand All @@ -25,11 +25,11 @@ test('tagname check with "v"', async (t) => {

test('tagname check without "v"', async (t) => {
const actual = (await ReleaseNotes.makeLatestReleaseNotes({
latest: function () {
return {
tag_name: '1.0',
body: ''
}
getTagName: function () {
return 'v1.0'
},
getBody: function () {
return ''
}
})).contents
t.true(/# What's New in v1.0/.test(actual), '`# What"s New in tagname without "v"')
Expand Down

0 comments on commit b5824d2

Please sign in to comment.