question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot run karma tests on Windows

See original GitHub issue

For some reason cannot run karma tests with Headless Chrome on Windows 10. I tried to use non-headless Chrome and even Firefox, but the result was the same.

I’m trying to run tests for #203. They are failed, and I’m unable to reproduce what happened.

Command: npm run test -- --scope @open-wc/testing-helpers (for npm run test it fails as well) Preparation: I run all commands described in CONTRIBUTING.md. However, due to uninstalled dependencies, I had to run pure npx lerna bootstrap without --no-ci option. nodejs: 11.6.0 npm: 6.1.0 OS: Windows 10 Log:

0 info it worked if it ends with ok
1 verbose cli [ '<bin>\\nodejs\\node.exe',
1 verbose cli   '<global node modules>\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'test',
1 verbose cli   '--',
1 verbose cli   '--scope',
1 verbose cli   '@open-wc/testing-helpers' ]
2 info using npm@6.1.0
3 info using node@v11.6.0
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle @open-wc/root@~pretest: @open-wc/root@
6 info lifecycle @open-wc/root@~test: @open-wc/root@
7 verbose lifecycle @open-wc/root@~test: unsafe-perm in lifecycle true
8 verbose lifecycle @open-wc/root@~test: PATH: <long PATH variable>
9 verbose lifecycle @open-wc/root@~test: CWD: <Project Root>\open-wc
10 silly lifecycle @open-wc/root@~test: Args: [ '/d /s /c',
10 silly lifecycle   'lerna run test --stream --concurrency 1 "--scope" "@open-wc/testing-helpers"' ]
11 silly lifecycle @open-wc/root@~test: Returned: code: 1  signal: null
12 info lifecycle @open-wc/root@~test: Failed to exec test script
13 verbose stack Error: @open-wc/root@ test: `lerna run test --stream --concurrency 1 "--scope" "@open-wc/testing-helpers"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (<global node modules>\npm\node_modules\npm-lifecycle\index.js:304:16)
13 verbose stack     at EventEmitter.emit (events.js:188:13)
13 verbose stack     at ChildProcess.<anonymous> (<global node modules>\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:188:13)
13 verbose stack     at maybeClose (internal/child_process.js:978:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
14 verbose pkgid @open-wc/root@
15 verbose cwd <Project Root>\open-wc
16 verbose Windows_NT 10.0.17763
17 verbose argv "<bin>\\nodejs\\node.exe" "<global node modules>\\npm\\bin\\npm-cli.js" "run" "test" "--" "--scope" "@open-wc/testing-helpers"
18 verbose node v11.6.0
19 verbose npm  v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error @open-wc/root@ test: `lerna run test --stream --concurrency 1 "--scope" "@open-wc/testing-helpers"`
22 error Exit status 1
23 error Failed at the @open-wc/root@ test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
web-padawancommented, Feb 11, 2019

FYI, I had similar problems in AppVeyor and reverted to ^4.0.0-rc.5 which works nicely on Windows.

1reaction
web-padawancommented, Feb 11, 2019

I tried downgrading and had issues cannot find framework “webpack” from karma, maybe I messed up the install though

Yes, that needs to be removed when using 3.x or 4.x as it has been added in 5.0.0 alpha

Generally, I would not recommend using alpha releases, unless there is a strong reason, like security dependency bump. Alphas are usually considered quite unstable, and can break any time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Karma test runner
I'm getting a weird error from the browser, how can I debug it? # Go to the captured browser and click the "DEBUG"...
Read more >
karma test runner not running any tests - Stack Overflow
Under karma.config.js , set either singleRun or autoWatch to true . In your case both of them are set to false, hence karma...
Read more >
Karma test runner does not run with latest compiled code
Create a Karma run configuration that uses test/karma.conf.js 5. Run with the created configuration 6. In the karma test runner window, toggle on...
Read more >
Run unit tests with Test Explorer - Visual Studio (Windows)
You can't run a test in an abstract class, because tests are only defined in abstract classes and not instantiated. To run tests...
Read more >
karma-runner/karma - Gitter
I have almost 5000 test cases and am running test cases in vsts but everytime ... deps: tests, // start test run, once...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found