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

Why does Stryker JS hang when used with angular ng test? #5099

Open
saranyanandagopal opened this issue Oct 24, 2024 · 0 comments
Open

Why does Stryker JS hang when used with angular ng test? #5099

saranyanandagopal opened this issue Oct 24, 2024 · 0 comments
Labels
⁉ Question Further information is requested

Comments

@saranyanandagopal
Copy link

saranyanandagopal commented Oct 24, 2024

Question

Why does Stryker JS hang when used with angular ng test?

Stryker environment

"@stryker-mutator/core": "^8.6.0",
"@stryker-mutator/karma-runner": "^8.6.0"
"karma": "6.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "^2.0.3",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.0.0",
"karma-junit-reporter": "^2.0.1",
"karma-parallel": "^0.3.1"

Additional context

When the stryker command "npx stryker run" is run, source files are instrumented, sandbox folder is created and working directory is changed to the sandbox directory. I see the below output in the terminal and nothing else happens after that. Navigating manually to the karma runner on http://localhost:9876/# shows "localhost refused to connect."

Starting Angular tests: ng test --progress=false --karma-config=C:\dev\monorepo\web.repo\node_modules@stryker-mutator\karma-runner\stryker-karma.conf.cjs --project=1-web
Starting Angular tests: ng test --progress=false --karma-config=C:\dev\monorepo\web.repo\node_modules@stryker-mutator\karma-runner\stryker-karma.conf.cjs --project=1-web

When I "cd" into the sandbox folder and run the below command manually:

ng test --progress=true --karma-config=apps/1-web/karma.conf.js --project=1-web

I see this on http://localhost:9876/#
karma-runner-1
The browser just hangs there. No console errors on the debug window either. The debug window is just blank and console shows "Skipped 0 tests"

I tried removing ngConfig->testArguments-> project and running Stryker, same result.

But if I run "ng test" in the sandbox folder, all tests are running.

My project structure:
project-structure

@saranyanandagopal saranyanandagopal added the ⁉ Question Further information is requested label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⁉ Question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant