* Top level private APIs (e.g. jasmine.private.whatever) are no longer
exposed
* jasmineRequire is no longer exposed
* core is self-booting
* Globals are automatically created in browsers. (They can subsequently
be removed by user code if desired.)
* Globals are *not* automatically created in Node. An installGlobals
function is exported instead. The jasmine package calls installGlobals
unless configured not to do so.
* In Node, the same instance is returned each time jasmine-core is
imported. A reset function is exported. It effectively resets all state
by discarding the env and creating a new one. This allows mulitple
sequential runs within the same process to be independent of each
other, but does not allow multiple concurrent runs. (That probably never
worked anyway.)
Fixes#2094
To support top level await, jasmine-browser-runner needs to be able
to delay env execution until after spec files have initialized. The
old-fashioned event listener style makes that straightforward.
jsApiReporter was initially added as part of the pre-1.0 Ruby based browser
runner. It looks like it was designed to resolve a race condition betweeen
jasmine-core's startup in the browser and the Ruby runner's startup. Modern
runners handle that either by buffering messages in a custom reporter (e.g.
jasmine-browser-runner's BatchReporter) or by calling env.execute() after a
communication channel has been set up (e.g. the old Jasmine ruby gem). In
any other context, a custom reporter is easier to use than jsApiReporter
because it doesn't require polling.
Adding jsApiReporter to the env imposes small but measurable penalties in
time and space, both of which are proportional to the size of the test
suite.
Other than jasmine-py and Testdouble's jasmine-rails gem, neither of which
ever supported jasmine-core 4 or later, I can find scant evidence of
interest and no evidence of usage after about 2012.
This isn't comprehensive but it should be broad enough to ensure that most
people who would be affected by blocking monkey patching see a warning.
Covers the jasmine namespace as well as classes that are monkey patched by
zone.js.
Replacing globals (describe/it/etc) doesn't trigger a warning because they
belong to the user and are expected to be replaced.
Pretty printing is occasionally useful outside of the places where a
configured pretty printer is injected (matchers and asymmetric equality
testers). Users sometimes use the private basicPrettyPrinter for that.
jasmine.pp is part of the public interface and uses the current runable's
custom object formatters.