load-invalid-frontmatter
Tests loading a project: how files are read and which load errors are reported.
Our implementation passes this case when its check --json output for the input below equals the expected
output.
Input
nodes/a.mdno frontmatter herenodes/b.md---
id: [unclosed
---nodes/c.md---
- just
- a list
---nodes/ok.md---
id: ok
type: t
---Expected output
0 ghosts · 3 load errors · 1 nodes · 0 results
expected.json{
"ghosts": [],
"load_errors": [
{
"file": "a.md",
"kind": "invalid_frontmatter"
},
{
"file": "b.md",
"kind": "invalid_frontmatter"
},
{
"file": "c.md",
"kind": "invalid_frontmatter"
}
],
"nodes": [
{
"body": "",
"fields": {},
"id": "ok",
"links": [],
"parent": null,
"plane": null,
"title": "ok",
"type": "t"
}
],
"results": [],
"structure": {
"errors": [],
"warnings": []
}
}