The historic elm library for unittests does emit js code meant to run on node.
There is also a cottage industry of applications in elm that don’t target the browser like elm-review, and applications running elm code without using its js output, like elm-test-rs. These are made possible by the relative simplicity of elm’s syntax and semantics, which mean getting a workable ast is easy.