🛠️ Repo: Test "require interface" #2982
Labels
area: repository tooling
concerning ease of contribution
semver-patch
implementation requires increase of "patch" version number; "bug fixes"
status: accepting prs
Mocha can use your help with this one!
We're currently testing the ability to
require("mocha").it
andrequire("mocha").describe
but none of the other exported interface functions: https://github.com/mochajs/mocha/blob/f20de56637b2223f614ce40adc0d41a58030f042/test/unit/required-tokens.spec.jsFull list here:
mocha/lib/mocha.js
Lines 200 to 214 in 2bc9c4d
I think the test file above should just use the global
describe
andit
, but inside theit
we should assert that the exports all are equal to the corresponding globals. It would be "more brittle" in the sense that we would have to change the test if we wanted to change the implementation from a simple reference copy to having separate global and exported functions, but I have a hard time imagining why we'd want/need to do that at the moment, and equality comparison would be fine for the current implementation and waaaaay easier than coming up with a way to use every last one of them and check for the correct behavior (and the current test doesn't even do the correct-behavior part for the two functions it does try using).While we're in there, let's remove the
done
since the test is (and would still be) synchronous.Note that once #2972 is resolved we should include
xit
(and whatever otherx
functions we have) in the new test.The text was updated successfully, but these errors were encountered: