Open loynoir opened 3 years ago
Is there any likelihood of this PR getting merged, or is karma-mocha essentially an abandoned/unmaintained project at this point?
(Please accept that this is a genuine question, I'm not trying to be rude.)
It's been a while since I've done anything with karma, but recently I had cause to revisit an old project to upgrade the version of sinon.js it used, and in the process I discovered that as of SinonJS v11, potential memory leaks are reported and the recommendation is to call sinon.restore()
in an afterEach
hook of every test suite.
This would seem to be a perfect use case for Mocha v8.0.0+ root hooks, hence what has led me to this PR.
I also note that in https://github.com/karma-runner/karma-mocha/issues/209 it was mentioned that
218 should allow release to be driven by successful post-commit tests.
...but it is unclear what in practice that means for this project as there has only been 1 release since that comment, despite the backlog of PRs such as this one that appear to have passed all checks?
If the answer is that yes, there are no maintainers and/or volunteers are wanted (which is perfectly understandable), perhaps a note could be added to the README?
Related issues
https://github.com/karma-runner/karma-mocha/issues/243
Changes
mocha.run
. If await failed, add a unit test, and throw error within.lib/adapter.js
from gitignore, so can usenpm install <repo>
.mocha.requireHooks
now supported, load thru{type:"import", value:"/base/my/path/to/mochaHooks.mjs"}
mocha.requireHooks.beforeAll
works.mocha.requireHooks.afterAll
to verifymocha.run
run after all slow ESM modules.requireHooks
andtype = 'module'
```txt Uncaught TypeError: this[opt] is not a function ``` Update mocha from 3.5.3 to 9.1.3, to support rootHooks ```txt Uncaught SyntaxError: Unexpected token 'export' ``` Update karma from 1.7.1 to 6.3.6, to support files.type = 'module' ```txt WARN [karma-server]: Passing raw CLI options to `new Server(config, done)` is deprecated. Use `parseConfig(c onfigFilePath, cliOptions, {promiseConfig: true, throwErrors: true})` to prepare a processed `Config` instance and pass that as the `config` argument instead. ``` Update grunt-karma from 2.0.0 to 4.0.2, to get rid of warning.
README.md
updated forrequireHooks
TODO
import()
, reported SyntaxError by low version eslintimportSync()
andimportSyncFallback()
when mocha accept serializable.requireHooks
, or acceptimport()
as.requireHooks
input.