4e17212d44
Many `ngUpgrade` tests need to manually [bootstrap modules][1] (instead of using `TestBed` which automatically cleans up) and thus need to also manually clean up afterwards (e.g. by calling [destroyPlatform()][2] after each test). Failing to destroy the platform is usually not a problem, unless the next test tries to manually destroy it (as a precaution), as happens [here][3] (among other places). More specifically, the problem happens, because (as part of the clean-up happening on platform destruction) upgraded components will try to [call a method][4] on `angular.element` after `angular` has been [set to `undefined`][5] (assuming the last test was using the [withEachNg1Version()][6] helper). Because the test order is pseudo-random and thus different on each run, these errors did not always come up and - when they did- they would go away after a couple of reruns, making them appear as flakes on CI. (For reference, the issue was introduced in 43c33d566.) This commit eliminates the issue by always destroying the platform after each `ngUpgrade` test. Jira issue: FW-924 [1]: |
||
---|---|---|
.. | ||
common | ||
dynamic | ||
static | ||
BUILD.bazel |