mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
22 lines
643 B
Text
22 lines
643 B
Text
expect
|
|
{
|
|
html: Html({})
|
|
html =
|
|
Element("a", 43, [HtmlAttr("href", "https://www.roc-lang.org/")], [Text("Roc")])
|
|
|
|
actual: {nodes: List(RenderedNode), siblingIds: List(U64)}
|
|
actual =
|
|
indexNodes({nodes: [], siblingIds: []}, html)
|
|
|
|
expected: {nodes: List(RenderedNode), siblingIds: List(U64)}
|
|
expected = {
|
|
nodes: [
|
|
RenderedText("Roc"),
|
|
RenderedElement("a", {emptyRenderedAttrs&htmlAttrs: Dict.fromList([("href", "https://www.roc-lang.org/")])}, [0])
|
|
],
|
|
siblingIds: [1]
|
|
}
|
|
|
|
(actual.nodes == expected.nodes)
|
|
and (actual.siblingIds == expected.siblingIds)
|
|
}
|