Skip to content

Run tests with Electron #1451

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

Closed
bokuweb opened this issue Jul 13, 2017 · 5 comments
Closed

Run tests with Electron #1451

bokuweb opened this issue Jul 13, 2017 · 5 comments

Comments

@bokuweb
Copy link

bokuweb commented Jul 13, 2017

Hi. i'm developing Avaron(https://github.com/bokuweb/avaron), which forked from vdbwouter/electron-ava, to run tests with electron .(plase see also, why? (https://github.com/bokuweb/avaron#why )).It works with AVA v0.21+.

Avaron is not forked from AVA, but copy and edit below files from AVA to launch electron.

If I can hook into the below point, I may be able to do Electron support without having to fork/copy from AVA. Is there a good idea?

avaron/lib/cli.js

I needed to add options for electron (renderer, windowOptions and fixture for now).

avaron/lib/fork.js

I needed to modify child_process.spawn to launch electron process.

related

avajs/awesome-ava#21

@vadimdemedes vadimdemedes changed the title To run tests with Electon. Run tests with Electron Jul 13, 2017
@novemberborn
Copy link
Member

@bokuweb this is really cool!

I'm wondering how we can best support this. I'm not convinced AVA itself should support Electron as a process target. Perhaps though the "test runner pool" could be abstracted so that other pools can be provided by users. In your case that would be an Electron pool. We'd have to determine how to provide CLI flags and package.json options as well. We'd also have to standardize the communication interface between the main AVA process and the test workers.

This is lower-level than #1043 but it could be quite interesting. It may work for Wallaby.js as well.

@avajs/core, @ArtemGovorov, thoughts?

@ArtemGovorov
Copy link
Contributor

@novemberborn I like the idea of the abstracted "test runner pool". It might make it easier for wallaby (as well as others) to integrate with AVA. I think it is generally a good thing to separate the testing framework part from the test runner part, makes it easier to reuse/hook into/integrate with those parts.

@sindresorhus
Copy link
Member

Relevant issue: #1428

@novemberborn
Copy link
Member

Relevant issue: #1428

Heh I wonder if that was still in by subconscious 👍

@novemberborn
Copy link
Member

We're focusing on running just Node.js code for the foreseeable future.

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

No branches or pull requests

4 participants