treesit-auto icon indicating copy to clipboard operation
treesit-auto copied to clipboard

No automated tests

Open renzmann opened this issue 3 years ago • 4 comments

We're at the point where it's tough to test all the different cases by hand now:

  • Every supported mode is, in fact, automatically using the tree-sitter version
  • Shell modes correctly launching bash-ts-mode
  • Activation/fallback/prompt for all settings of treesit-auto-install when grammars are both missing and installed
  • Each combination of name/prefix and tree-sitter grammar name in scanner.c
  • When modes are aliased, like js-mode to javascript-mode, that the aliased entry in auto-mode-alist is correctly referenced

I am not yet familiar with ERT, but since it's built-in it seems appropriate to add unit testing with it to the package. If any contributors have experience building a test suite with it, contributions are most welcome. Otherwise, it will take some time to get this stood up while I work through the documentation.

renzmann avatar Feb 07 '23 19:02 renzmann

I think once this issue has been addressed it will be easier to test tree sitter support with github actions: https://github.com/purcell/setup-emacs/issues/32

wkirschbaum avatar Feb 14 '23 09:02 wkirschbaum

I would love to work on this! :D I use Eask and GHA, here are a few examples:

Basic

  • https://github.com/emacs-grammarly/lsp-grammarly/blob/master/.github/workflows/test.yml (with Makefile)
  • https://github.com/emacs-elsa/flycheck-elsa/blob/master/.github/workflows/test.yml (without Makefile)

More complicated

  • https://github.com/emacs-lsp/lsp-mode/blob/master/.github/workflows/test.yml

LMKWYT?

(Oh, BTW. I use jcs090218/setup-emacs (mine) since purcell's doesn't support Windows)

jcs090218 avatar Feb 22 '23 01:02 jcs090218

@jcs090218 apologies I missed this! (Been moving my home for the last couple months so this project had to go by the wayside for a bit). I think something simple would be a good start, and I like the look of Eask. Ultimately, if you have an opinion on how we could run testing then I'll defer to your experience here, since it's a first for me. What I could do, though, is provide some of the common cases we ran into during development that should be checked each time a change is made

renzmann avatar May 16 '23 11:05 renzmann

another example: https://github.com/wkirschbaum/elixir-ts-mode/blob/main/.github/workflows/ci.yml

wkirschbaum avatar May 16 '23 12:05 wkirschbaum