def test_no_links(tmp_path: Path):
    """
    Test that a note with no outgoing links gets an empty backlinks list.
    """
    create_markdown_file(tmp_path, "A.md", "This is a note with no links.")
    reader = ObsidianReader(input_dir=str(tmp_path))
    docs = reader.load_data()

    doc_a = get_doc_by_note_name(docs, "A")
    assert doc_a is not None
    # Since no note links to A, its backlinks should be an empty list.
    assert doc_a.metadata.get("backlinks") == []

    Test that a note with no outgoing links gets an empty backlinks list.
    
llama-index-integrations/readers/llama-index-readers-obsidian/tests/test_readers_obsidian.py