Lezer testing for error nodes

This is an example of code and the Ast from my lezer parser:

code: foo.
Ast: ObjectCreationExpression(Identifier,".",⚠)

Is there a way to test this case with fileTests from @lezer/generator/dist/test ?

I understand the test runner fails whenever it find an error node SyntaxError: No parse at X

Maybe testTree supports this (haven’t test it) but it would be nice to use the same approach to test happy/unhappy paths

If there’s a character in your expected tree, it won’t.

Will check again if I missed anything, thanks