use wikrs::{parser, render};
#[test]
fn parse_path_snapshot() {
let wikitext = "\
'''Earth''' is the [[Planet|third planet]] from the Sun.
== History ==
Formed long ago. See [https://example.org/overview the overview].
* accretion of [[planetesimal]]s
* differentiation into a [[planetary core|core]]
The planet {{convert|6051|km}} has '''two''' moons.{{citation needed}}
{| class=\"wikitable\"
! Property !! Value
|}";
let parsed = parser::parse(wikitext);
let codes: Vec<&str> = parsed.diagnostics.iter().map(|d| d.code).collect();
let report = format!(
"=== render::plain ===\n{}\n\n=== diagnostics: {codes:?} ===",
render::plain(&parsed.nodes),
);
insta::assert_snapshot!(report);
}