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]: |
||
---|---|---|
.. | ||
animations | ||
bazel | ||
benchpress | ||
common | ||
compiler | ||
compiler-cli | ||
core | ||
docs | ||
elements | ||
examples | ||
forms | ||
http | ||
language-service | ||
platform-browser | ||
platform-browser-dynamic | ||
platform-server | ||
platform-webworker | ||
platform-webworker-dynamic | ||
private/testing | ||
router | ||
service-worker | ||
upgrade | ||
BUILD.bazel | ||
README.md | ||
empty.ts | ||
es6-subset.d.ts | ||
goog.d.ts | ||
license-banner.txt | ||
rollup.config.js | ||
system.d.ts | ||
tsconfig-build.json | ||
tsconfig-test.json | ||
tsconfig.json | ||
types.d.ts |
README.md
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
License: MIT