angular/packages
Kristiyan Kostadinov 0f23f7343e fix(core): error in TestBed if module is reset mid-compilation in ViewEngine (#42669)
When `TestBed.compileComponents` is called under ViewEngine, we kick off a compilation and return a promise that resolves once the compilation is done. In most cases the consumer doesn't _have_ to await the returned promise, unless their components have external resources.

The problem is that the test could be over by the time the promise has resolved, in which case we still cache the factory of the test module. This becomes a problem if another compilation is triggered right afterwards, because it'll see that we still have a `_moduleFactory` and it won't recreate the factory.

These changes resolve the issue by saving a reference to the module type that is being compiled and checking against it when the promise resolves.

Note that while this problem was discovered while trying to roll out the new test module teardown behavior in the Components repo (https://github.com/angular/components/pull/23070), it has been there for a long time. The new test behavior made it more apparent.

PR Close #42669
2021-06-30 14:32:23 -07:00
..
animations build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
bazel feat(core): support TypeScript 4.3 (#42022) 2021-06-04 11:17:09 -07:00
benchpress test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
common build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
compiler feat(compiler): support number separators in templates (#42672) 2021-06-30 10:36:15 -07:00
compiler-cli build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
core fix(core): error in TestBed if module is reset mid-compilation in ViewEngine (#42669) 2021-06-30 14:32:23 -07:00
docs docs: remove/update broken links in resources appearing on aio (#42232) 2021-05-26 14:21:12 -07:00
elements build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
examples docs(core): improve applicationref.bootstrap docs (#42407) 2021-06-22 16:30:37 +00:00
forms build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
language-service feat(compiler): add support for shorthand property declarations in templates (#42421) 2021-06-21 23:40:47 +00:00
localize build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
misc/angular-in-memory-web-api feat(core): support TypeScript 4.3 (#42022) 2021-06-04 11:17:09 -07:00
platform-browser build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
platform-browser-dynamic build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
platform-server build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
private/testing docs: convert the last my-app components to app-root (#42256) 2021-05-25 22:13:36 +00:00
router build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
service-worker build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
upgrade build: use api-golden tool from dev-infra for testing public API (#42688) 2021-06-30 11:43:48 -07:00
zone.js build: lock file maintenance (#42568) 2021-06-23 17:36:41 +00:00
BUILD.bazel build: remove unused no-strict tsconfig file (#42506) 2021-06-07 10:47:47 -07:00
circular-deps-test.conf.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
license-banner.txt docs: update year (#40925) 2021-02-22 12:37:40 -08:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig.json build: exclude compiler compliance tests from Saucelabs tests (#41866) 2021-04-30 14:15:10 -07:00
types.d.ts build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT