Skip to content

Commit 6b1c595

Browse files
MSSandroidRokt33r
authored andcommitted
add test for PlantUml Ditaa
1 parent 0003de8 commit 6b1c595

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

tests/fixtures/markdowns.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,20 @@ rectangle checkout {
165165
@enduml
166166
`
167167

168+
const plantUmlDitaa = `
169+
@startditaa
170+
+--------+ +-------+ +-------+
171+
| +---+ ditaa +--> | |
172+
| Text | +-------+ |Diagram|
173+
|Dokument| |!Magie!| | |
174+
| {d}| | | | |
175+
+---+----+ +-------+ +-------+
176+
: ^
177+
| Ein Haufen Arbeit |
178+
+-------------------------+
179+
@endditaa
180+
`
181+
168182
export default {
169183
basic,
170184
codeblock,
@@ -181,5 +195,6 @@ export default {
181195
plantUmlMindMap,
182196
plantUmlGantt,
183197
plantUmlWbs,
198+
plantUmlDitaa,
184199
plantUmlUml
185200
}

tests/lib/markdown-test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,8 @@ test('Markdown.render() should render PlantUML Umls correctly', t => {
9393
const rendered = md.render(markdownFixtures.plantUmlUml)
9494
t.snapshot(rendered)
9595
})
96+
97+
test('Markdown.render() should render PlantUML Ditaa correctly', t => {
98+
const rendered = md.render(markdownFixtures.plantUmlDitaa)
99+
t.snapshot(rendered)
100+
})

tests/lib/snapshots/markdown-test.js.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ The actual snapshot is saved in `markdown-test.js.snap`.
44

55
Generated by [AVA](https://ava.li).
66

7+
## Markdown.render() should render PlantUML Ditaa correctly
8+
9+
> Snapshot 1
10+
11+
`<img src="http://www.plantuml.com/plantuml/png/SoWkIImgISaiIKpaqjQ50cq51GLj93Q2mrMZ00NQO3cmHX3RJW4cKmDI4v9QKQ805a8nfyObCp6zA34NgCObFxiqDpMl1AIcHj4tCJqpLH5i18evG52TKbk3B8og1kmC0cvMKB1Im0NYkA2ckMRcANWabgQbvYau5YMbPfP0p4UOWmcqkHnIyrB0GG00" alt="uml diagram" />␊
12+
`
13+
714
## Markdown.render() should render PlantUML Gantt correctly
815

916
> Snapshot 1
196 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)