Skip to content

Commit

Permalink
test(string-literal): fix mermaid diagrams comparison
Browse files Browse the repository at this point in the history
The intent of this test was to ensure rendering a Mermaid diagram is
equivalent when using the `mermaid` string literal or the `Diagram` type
directly. What it was testing was whether the resulting `Diagram`
instances were equivalent.

With the introduction of the `options` field in
1c814b8, this is no longer the case as
a `Dict{String,String}()` does not equal another
`Dict{String,String}()`. This caused the test to fail. What _should be
compared is the rendered diagram.
  • Loading branch information
bauglir committed Jul 13, 2022
1 parent ec380ba commit 6ff23e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/kroki/string_literals_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using Kroki: Diagram, @mermaid_str, @plantuml_str

string_literal_mermaid = mermaid"graph TD; A --> B"
diagram_type_mermaid = Diagram(:mermaid, "graph TD; A --> B")
@test string_literal_mermaid == diagram_type_mermaid
@test "$string_literal_mermaid" == "$diagram_type_mermaid"

@testset "support interpolation" begin
# String macros do no support string interpolation out-of-the-box, this
Expand Down

0 comments on commit 6ff23e3

Please sign in to comment.