diff --git a/tests/fixtures/markdowns.js b/tests/fixtures/markdowns.js index 340f2ddd..cd25f332 100644 --- a/tests/fixtures/markdowns.js +++ b/tests/fixtures/markdowns.js @@ -109,6 +109,62 @@ const footnote = ` hello-world: https://github.com/BoostIO/Boostnote/ ` +const plantUmlMindMap = ` +@startmindmap +* Debian +** Ubuntu +*** Linux Mint +*** Kubuntu +*** Lubuntu +*** KDE Neon +** LMDE +** SolydXK +** SteamOS +** Raspbian with a very long name +*** Raspmbc => OSMC +*** Raspyfi => Volumio +@endmindmap +` + +const plantUmlGantt = ` +@startgantt +[Prototype design] lasts 15 days +[Test prototype] lasts 10 days +[Test prototype] starts at [Prototype design]'s end +@endgantt +` + +const plantUmlWbs = ` +@startwbs +* Business Process Modelling WBS +** Launch the project +*** Complete Stakeholder Research +*** Initial Implementation Plan +** Design phase +*** Model of AsIs Processes Completed +**** Model of AsIs Processes Completed1 +**** Model of AsIs Processes Completed2 +*** Measure AsIs performance metrics +*** Identify Quick Wins +** Complete innovate phase +@endwbs +` + +const plantUmlUml = ` +@startuml +left to right direction +skinparam packageStyle rectangle +actor customer +actor clerk +rectangle checkout { + customer -- (checkout) + (checkout) .> (payment) : include + (help) .> (checkout) : extends + (checkout) -- clerk +} +@enduml +` + export default { basic, codeblock, @@ -121,5 +177,9 @@ export default { supTexts, deflists, shortcuts, - footnote + footnote, + plantUmlMindMap, + plantUmlGantt, + plantUmlWbs, + plantUmlUml } diff --git a/tests/lib/markdown-test.js b/tests/lib/markdown-test.js index 31ffc518..6600a5f3 100644 --- a/tests/lib/markdown-test.js +++ b/tests/lib/markdown-test.js @@ -73,3 +73,23 @@ test('Markdown.render() should render footnote correctly', t => { const rendered = md.render(markdownFixtures.footnote) t.snapshot(rendered) }) + +test('Markdown.render() should render PlantUML MindMaps correctly', t => { + const rendered = md.render(markdownFixtures.plantUmlMindMap) + t.snapshot(rendered) +}) + +test('Markdown.render() should render PlantUML Gantt correctly', t => { + const rendered = md.render(markdownFixtures.plantUmlGantt) + t.snapshot(rendered) +}) + +test('Markdown.render() should render PlantUML WBS correctly', t => { + const rendered = md.render(markdownFixtures.plantUmlWbs) + t.snapshot(rendered) +}) + +test('Markdown.render() should render PlantUML Umls correctly', t => { + const rendered = md.render(markdownFixtures.plantUmlUml) + t.snapshot(rendered) +}) diff --git a/tests/lib/snapshots/markdown-test.js.md b/tests/lib/snapshots/markdown-test.js.md index 4111c2f2..e18440dc 100644 --- a/tests/lib/snapshots/markdown-test.js.md +++ b/tests/lib/snapshots/markdown-test.js.md @@ -4,6 +4,34 @@ The actual snapshot is saved in `markdown-test.js.snap`. Generated by [AVA](https://ava.li). +## Markdown.render() should render PlantUML Gantt correctly + +> Snapshot 1 + + `uml diagram␊ + ` + +## Markdown.render() should render PlantUML MindMaps correctly + +> Snapshot 1 + + `uml diagram␊ + ` + +## Markdown.render() should render PlantUML Umls correctly + +> Snapshot 1 + + `uml diagram␊ + ` + +## Markdown.render() should render PlantUML WBS correctly + +> Snapshot 1 + + `uml diagram␊ + ` + ## Markdown.render() should render footnote correctly > Snapshot 1 diff --git a/tests/lib/snapshots/markdown-test.js.snap b/tests/lib/snapshots/markdown-test.js.snap index 3f5ec41c..659d568f 100644 Binary files a/tests/lib/snapshots/markdown-test.js.snap and b/tests/lib/snapshots/markdown-test.js.snap differ