Skip to content

Testing a Javascript app with Elixir-Wallaby #710

Answered by mhanberg
plpullen asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

This is an interesting use case of Wallaby. I think what i would do is create a new project with mix new test_suite --sup, and install Wallaby.

There are a couple of approaches we could take here:

You would write your Wallaby tests as normal, but in your Application, you would start a process that starts a Port that starts your JavaScript application. This assumes you are running something like npm run start that starts up a JS web server that serves your JS app

If your JS application has a non-deterministic start time, you'll probably want a helper that can hit an endpoint or a page that can signal to wallaby that it is ready and the tests can start.

Another way to approach it …

Replies: 5 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@plpullen
Comment options

@mhanberg
Comment options

Answer selected by plpullen
Comment options

You must be logged in to vote
1 reply
@plpullen
Comment options

Comment options

You must be logged in to vote
1 reply
@mhanberg
Comment options

Comment options

You must be logged in to vote
2 replies
@plpullen
Comment options

@mhanberg
Comment options

Comment options

You must be logged in to vote
1 reply
@mhanberg
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants