Description
We're currently testing the ability to require("mocha").it
and require("mocha").describe
but none of the other exported interface functions: https://github.com/mochajs/mocha/blob/f20de56637b2223f614ce40adc0d41a58030f042/test/unit/required-tokens.spec.js
Full list here:
Lines 200 to 214 in 2bc9c4d
I think the test file above should just use the global describe
and it
, but inside the it
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 other x
functions we have) in the new test.