fix(testing): use correct server process reference when killing the server in the cypress preset (#30994)
## Current Behavior
Cypress e2e tasks fail when trying to kill the web server with:
```bash
TypeError: Cannot read properties of undefined (reading 'childProcess')
at /<repo path>/node_modules/@nx/cypress/plugins/cypress-preset.js:65:30
...
```
## Expected Behavior
Cypress e2e tasks should not fail when trying to kill the web server.
## Related Issue(s)
Fixes #
This commit is contained in:
parent
51168a7c38
commit
80e6edd707
@ -94,7 +94,7 @@ function startWebServer(webServerCommand: string) {
|
||||
} else {
|
||||
return new Promise<void>((res, rej) => {
|
||||
if (process.platform === 'win32' || process.platform === 'darwin') {
|
||||
if (this.childProcess.kill()) {
|
||||
if (serverProcess.kill()) {
|
||||
res();
|
||||
} else {
|
||||
rej('Unable to kill process');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user