Skip to content

Conversation

@alexeykuzmin
Copy link
Contributor

@alexeykuzmin alexeykuzmin commented Oct 21, 2020

Electron allows disabling "remote" module at build time.
Let's make "electron-mocha" work for such builds.

Avoid using "remote" module and use IPC calls
for console logging in non-interactive renderers.

Based on what Electron itself does for its tests
https://github.com/electron/electron/blob/22cb3cd18b1b771364edada515a4c138a8dddc6d/spec/static/main.js#L55-L63
https://github.com/electron/electron/blob/22cb3cd18b1b771364edada515a4c138a8dddc6d/spec/static/index.html#L18-L27

@alexeykuzmin alexeykuzmin force-pushed the use-fake-console-for-renderer branch from 71ccc85 to c879f21 Compare October 21, 2020 23:36
@alexeykuzmin alexeykuzmin force-pushed the use-fake-console-for-renderer branch from c879f21 to 9a98f20 Compare October 21, 2020 23:53
@inukshuk inukshuk merged commit 0760df9 into jprichardson:master Oct 22, 2020
@inukshuk
Copy link
Collaborator

Thanks!

We previously only forwarded the log and dir, so I'll add an option to opt-in or out of printing warnings.

inukshuk added a commit that referenced this pull request Oct 22, 2020
@alexeykuzmin alexeykuzmin deleted the use-fake-console-for-renderer branch October 22, 2020 11:13
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.

2 participants