test.fileTests: also return text, expected, config #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
make the
fileTestsfunction useful for parsing test filesexpectedhas leading + trailing whitespace (\n)maybe we should
expected = expected.trim()?What are you planning to use this for?
updating the
expectedstrings in test filesfor example after renaming tokens
similar to updating jest snapshot tests
tree-sitter has this feature too
sample code:
update test files for lezer-parser
used in
https://github.com/replit/codemirror-lang-nix/pull/3
https://github.com/milahu/lezer-parser-nix
test/update-expressions.js
test/manual-test.js
test/stringify-tree.js
All right, seems harmless enough.