load-not-json
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.md---
id: a
type: t
fields:
x: .nan
---nodes/c.md---
id: c
type: t
fields:
1: one
---nodes/ok.md---
id: ok
type: t
---Expected output
0 ghosts · 2 load errors · 1 nodes · 0 results
expected.json{
"ghosts": [],
"load_errors": [
{
"file": "a.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": []
}
}