Skip to content

Multi target#3

Draft
eliasson wants to merge 18 commits into
mainfrom
multi-target
Draft

Multi target#3
eliasson wants to merge 18 commits into
mainfrom
multi-target

Conversation

@eliasson

@eliasson eliasson commented Jun 17, 2026

Copy link
Copy Markdown
Owner

The current version of Garanti only supports the Erlang target. This was a well known limitation when I started, I wanted to use OTP, it was one of the driving factors. And I intended to use it on my backend project. Now I have an idea for a frontend thingy in Luster and I would like to have both Erlang and JavaScript support.

As I still want to use OTP for test execution when running on Erlang (it keeps tests isolated, allow parallel runs, and is a nice overall model) I landed in the decision to split Garanti into three libraries:

  • garanti - the core part. Defining the suite, test, assertions and implementing the matchers.
  • `garanti_erlang - the original runner for Erlang. This library also contains the tests for the matchers*
  • garanti_javascript - the new runner targetting JavaScript. Only a few tests for integration / smoketest.

A consuming client will then have to use both garanti and the runner they need, depending on what they target.

*) As Garanti is self-hosted in terms of tests it needs a runner, and the core project cannot introduce that dependency. So the tests needed to move.

TODO

  • Extract Erlang specifics to garanti_erlang.
  • Implement a new JavaScript runner.
    • Test discovery.
    • Test execution.
    • Test result reporting.
  • Update documentation on how to use.
  • Update CI / tooling to test and build all projects.
  • Add development helper script to toggle relative dependencies to actual HEX versions (once published)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant