The .emacs.d/tree-sitter/ directory isn't searched when running tests non-interactively. The Makefile sets HOME to /nonexistent, which is correct but has the unfortunate side-effect of not running all the tests properly even with the compiled grammars installed. The attached patch adds an environment variable, EMACS_TREE_SITTER_DIR, and sets it in the Makefile. I didn't bother documenting it because it's only intended for use in our own tests.