From 999e041d49e8f923ec4e63d7e4f4ad392294e82e Mon Sep 17 00:00:00 2001 From: skewb1k Date: Sat, 27 Dec 2025 08:34:18 +0300 Subject: [PATCH] docs: add tip about using `test --update` flag --- docs/src/creating-parsers/5-writing-tests.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/creating-parsers/5-writing-tests.md b/docs/src/creating-parsers/5-writing-tests.md index 0d0aeb60..438dc02a 100644 --- a/docs/src/creating-parsers/5-writing-tests.md +++ b/docs/src/creating-parsers/5-writing-tests.md @@ -87,6 +87,11 @@ The recommendation is to be comprehensive in adding tests. If it's a visible nod directory. It's typically a good idea to test all the permutations of each language construct. This increases test coverage, but doubly acquaints readers with a way to examine expected outputs and understand the "edges" of a language. +```admonish tip +After modifying the grammar, you can run `tree-sitter test -u` +to update all syntax trees in corpus files with current parser output. +``` + ## Attributes Tests can be annotated with a few `attributes`. Attributes must be put in the header, below the test name, and start with