Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for running tests with spago test #39

Open
cdepillabout opened this issue Jan 1, 2022 · 0 comments
Open

add support for running tests with spago test #39

cdepillabout opened this issue Jan 1, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@cdepillabout
Copy link
Member

Spago has a test command that makes it easy to run tests. PureNix probably needs something added to be able to work with spago test.

This hasn't really been a problem up until now, since none of the PureNix libraries have tests. But now there is a tasty-like testing framework for PureNix (https://github.com/thought2/purescript-miraculix by @thought2), so it would be really convenient to be able to run tests directly with spago test.

Someone interested in implementing this may want to do the following:

  • Investigate the Spago codebase to find out exactly what it does when running spago test.

    I imagine this function is a good place to start: https://github.com/purescript/spago/blob/aa7c0de6d903262f69452663c09fad9c441af8d3/src/Spago/Build.hs#L241-L256

    Keep in mind that it is quite possible there are two different code-paths here, one for the normal JS backend and one for alternative backends (like PureNix).

    It would be great if you could leave a comment on this issue with exactly what you figured out.

  • Optionally go on the PureScript Discord and ask in #compiler or #purerl how the Erlang backend handles spago test. They may have some good suggestions.

  • Decide on how PureNix should handle spago test, and leave a short comment here with how you see this working.

  • Send a PR implementing whatever is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant