clojure-emacs / clojure-ts-mode

The next generation Clojure major mode for Emacs, powered by TreeSitter
GNU General Public License v3.0
140 stars 13 forks source link

Run clojure-mode's test suite #25

Open vemv opened 1 year ago

vemv commented 1 year ago

As discussed in https://github.com/clojure-emacs/cider/pull/3461, the https://github.com/clojure-emacs/clojure-mode/tree/master/test tests could be copied here, and then run in a CI matrix.

Note that although clojure-mode uses circleci, I'd recommend GHA more, these days.

Please use an Emacs and OS matrix similar to CIDER's.

Do feel free to disable tests that don't make sense here, or that can be left for later.

I'd suggest using the Eldev file to disable such tests, rather than deletion or commenting out. (That way one may be able to even git-clone clojure-test at a fixed tag, and run test/ verbatim).

Cheers - V

dannyfreeman commented 1 year ago

I'm going to attempt to have these tests pulled into the repo in a way that preserves the history and contributors. I think I should be able to do something to the effect of:

  1. Fork clojure-mode
  2. re-write the history in such a way that only the tests folder is present in the repository.
  3. Add it as a remote to my local clojure-ts-mode repo.
  4. Create a merge commit between a clojure-mode commit and latest clojure-ts-mode.
kommen commented 3 weeks ago

As I ported some of the clojure-mode test harnesses in #55 and #56, but tried to keep it minimal in the light of this issue, how do we want to continue here?

In trying to run more of the clojure-mode tests, I found a lot of them don't work or identify real issues and limitations of clojure-ts-mode I'd like to address soonish.

kommen commented 3 weeks ago

Well, I went ahead and followed @dannyfreeman's outline. This is the result: https://github.com/clojure-emacs/clojure-ts-mode/pull/57

I guess we could use this as a starting point, deactivate all of the clojure-mode tests via eldev initially and then rename/bring over and adapt sets of tests and files step by step?

bbatsov commented 3 weeks ago

Yeah, that's a reasonable approach.