You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.
Hi @lana-k thank you for commenting. Currently, only karma-jasmine is supported(which is the default for Angular). The weird pattern you mention is the way the test explorer can load all tests without running them. In karma-jasmine when you pass in a pattern that is not matched, it skips all tests so they can be read without running them, which is a great behavior for the load functionality. On run, we pass in the correct grep which runs the specific test and skips all others. It would be nice to support other types of framework, would you like to submit a pull request that works with sinon-chai and jasmine?
Hi @Raagh, I came across this issue while investigating the possible use of your test explorer in a tech setup including Aurelia, TypeScript, Webpack, Karma, Mocha and Chai. When switching Mocha with Jasmine it works smoothly.
My question: Are you aware of blockers that prevent supporting Mocha as well as Jasmine tests (besides the actual work of implementing support)? If you are not aware of show stoppers I hope I can find some time working on supporting Mocha as well. I am completly new to extension development though.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment:
Steps to reproduce:
karma-sinon-chai
to >=v2.0.1Expected result: tests are displayed in the panel
Actual result: no tests found
Reason:
angular-karma_test-explorer
inout/core/karma/karma-runner.js
passes strange template:This template is used by karma runner as a filter with
grep
argumet. Seeout/core/integration/karma-http-client.js
:But there was a bug about
grep
is not working withkarma run
if it useskarma-sinon-chai
:karma-runner/karma-mocha#192. So,
--grep=$#%#
was actually ignored and all tests were found and displayed in the Test Explorer UI panel.But the bug was fixed on
karma-sinon-chai
in v2.0.1: https://github.com/kmees/karma-sinon-chai/commit/0c4ae586ef9bffc9529f1f58c1b0a4627608004c/. That's why after updating there was no tests found (becausegrep
is working now and it filtered all tests):How to fix:
In
karma-runner.js
replacewith
Important note:
The proposed solution works only for
Angular/Karma Test Explorer
v1.1.0. Since v1.2.0 with modifiedkarma-runner.js
there is this problem:https://gyazo.com/d4e13223cdad5a9de2863f30b89b9454
The text was updated successfully, but these errors were encountered: