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 a --require-main option #84

Merged
merged 1 commit into from
Sep 14, 2016
Merged

Conversation

MarshallOfSound
Copy link
Contributor

This will allow loading main process test utils when testing in the renderer process. Mocking the remote module in electron is iffy at the best of times so if we can require modules in the main process to help us mock the actual main process implementation it will make testing things in the renderer a lot easier 👍

@@ -4,7 +4,7 @@
"description": "Mocha tests in Electron.",
"main": "index.js",
"scripts": {
"test": "standard && node bin/electron-mocha test/main && node bin/electron-mocha --renderer test/renderer",
"test": "standard && node bin/electron-mocha test/main --require-main test/support/requireMain && node bin/electron-mocha --renderer test/renderer --require-main test/support/requireMain",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add these to test/mocha.opts instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep 👍 Missed that file 😆

@inukshuk
Copy link
Collaborator

Agreed, that's a useful option. Can you add it to the readme as well?

@jprichardson if @MarshallOfSound is interested, I'd suggest to add him as a collaborator :)

@inukshuk inukshuk merged commit 57e93aa into jprichardson:master Sep 14, 2016
@jprichardson
Copy link
Owner

@jprichardson if @MarshallOfSound is interested, I'd suggest to add him as a collaborator :)

This sounds good to me. @MarshallOfSound what say you?

@MarshallOfSound
Copy link
Contributor Author

@jprichardson Always happy to jump on board 👍

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.

None yet

3 participants