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 JEST_ELECTRON_STARTUP_ARGS #29

Merged
merged 3 commits into from
Jul 14, 2020
Merged

Conversation

Prior99
Copy link
Contributor

@Prior99 Prior99 commented Jul 7, 2020

See #27.
Instead of adding another environment variable JEST_ELECTRON_DISABLE_DEV_SHM_USAGE, I went with a more generic approach of adding aforementioned variable for adding arbitrary arguments to the electron process.
I also documented the issues found in #27 in the README.
A merge and publish to NPM would help my team and me a lot :)

README.md Outdated
Run electron with arbitrary arguments.

```bash
JEST_ELECTRON_STARTUP_ARGS='--disable-dev-shm-usage'
Copy link
Owner

Choose a reason for hiding this comment

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

JEST_ELECTRON_STARTUP_ARGS can contain --no-sandbox?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. It can contain any arbitrary argument.

Copy link
Owner

Choose a reason for hiding this comment

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

so we can remove the doc of no-sandbox, add a case in additional startup arguments

README.md Outdated
@@ -87,7 +87,14 @@ script:
- npm run test
```

- **docker**
Copy link
Owner

Choose a reason for hiding this comment

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

I think there is no need to add this item?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found the additional documentation useful for anyone encountering issues when running in docker, such as I did. Do you want me to delete this section in the Readme?

@Prior99
Copy link
Contributor Author

Prior99 commented Jul 8, 2020

Yes, we could do so, I just didn't want to break your interface.
Do you want me to remove JEST_ELECTRON_NO_SANDBOX from the code and update the documentation?

README.md Outdated

```bash
JEST_ELECTRON_NO_SANDBOX=1 jest
JEST_ELECTRON_STARTUP_ARGS='--disable-dev-shm-usage' jest
Copy link
Owner

Choose a reason for hiding this comment

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

this is typo? should be --no-sandbox!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. Fixed it.

@Prior99
Copy link
Contributor Author

Prior99 commented Jul 14, 2020

Hi, I implemented all your comments, is there anything else that you need?

@hustcc hustcc merged commit b588747 into hustcc:master Jul 14, 2020
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