Open segrey opened 7 years ago
This issue also affects running single test in project generated with vue init webpack my-project
command (https://youtrack.jetbrains.com/issue/WEB-32918).
Please review PR: https://github.com/karma-runner/karma-mocha/pull/206 //cc @maksimr
Proposed solution implemented in karma-sinon-chai
v2.0.1: https://github.com/kmees/karma-sinon-chai/commit/0c4ae586ef9bffc9529f1f58c1b0a4627608004c
Example project: https://github.com/tongrhj/karma-test/tree/cf4d63f6c91bd573adf224b626d2b96fce28488a Steps to reproduce:
Start server
Run tests
All tests are run unexpectedly.
Caused by executing
karma.start()
without passing config: https://github.com/kmees/karma-sinon-chai/blob/49b33ed97984dcadd87788606ca2131a7a0700da/chai-adapter.js#L17Can be fixed on karma-sinon-chai side with
However, probably, it'd be better to make karma-mocha not dependent on correct behavior of 3rd party frameworks. For example, karma-jasmine fetches
config
directly fromkarma
object: https://github.com/karma-runner/karma-jasmine/blob/v1.1.0/src/adapter.js#L324. Is it possible to implement a similar scheme for karma-mocha?