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

npm test should not execute outside commands. #22475

Closed
1 task
mshima opened this issue Jun 9, 2023 · 0 comments · Fixed by #23741
Closed
1 task

npm test should not execute outside commands. #22475

mshima opened this issue Jun 9, 2023 · 0 comments · Fixed by #23741
Labels
area: triage $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: undefined $100 https://www.jhipster.tech/bug-bounties/
Milestone

Comments

@mshima
Copy link
Member

mshima commented Jun 9, 2023

Overview of the issue

npm test should mock spawn functions.

Outside commands are not reproducible due to the environment.
Generators should run mocked functions that calls outside commands to avoid problems like #22474.

Related issues

#22474

Suggest a Fix

Switch from shelljs and child_process to generator's spawn[Command][Sync] methods.
Mock generator's spawn methods.

JHipster Version(s)
JHipster configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
@mshima mshima changed the title nom test should not execute outside commands. npm test should not execute outside commands. Jun 9, 2023
@deepu105 deepu105 added $100 https://www.jhipster.tech/bug-bounties/ $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ labels Aug 15, 2023
This was referenced Sep 29, 2023
@deepu105 deepu105 added this to the 8.0.0-rc.1 milestone Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: triage $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: undefined $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants