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 b5824d2 commit 47aa1d7
Showing 1 changed file with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,42 @@ MarkdownContents.setPinpointReadmeGithubPath('feelform/pinpoint')

test('tempalte engine', async (t) => {
const dut = new TemplateEngine(actualMD)
const actual = await dut.markdownContent()
const actual = await dut.markdownContent({
getTagName: function () {
return 'v1.0'
},
getBody: function () {
return ''
}
})
t.true(/<!-- <compatibilityHbase\.md> -->/.test(actual), 'compatibilityHbase.md matches')
t.end()
})

test('markdown section test', async (t) => {
const dut = new TemplateEngine(actualMD)
const actual = await dut.markdownContent()
const actual = await dut.markdownContent({
getTagName: function () {
return 'v1.0'
},
getBody: function () {
return ''
}
})
t.true(/<!-- <compatibilityHbase\.md> -->/.test(actual), 'compatibilityHbase.md matches')
t.end()
})

test('markdown from pinpoint index', async (t) => {
const dut = new TemplateEngine(actualMD)
const actual = await dut.markdownContent()
const actual = await dut.markdownContent({
getTagName: function () {
return 'v1.0'
},
getBody: function () {
return ''
}
})
t.true(/<!-- <compatibilityHbase\.md> -->/.test(actual), 'compatibilityHbase.md matches')
t.true(/<!-- <compatibilityJava\.md> -->/.test(actual), 'compatibilityJava.md matches')
t.true(/<!-- <compatibilityPinpoint\.md> -->/.test(actual), 'compatibilityPinpoint.md matches')
Expand Down

0 comments on commit 47aa1d7

Please sign in to comment.