@angular/core 12.0.2 → 12.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v12.0.2
2
+ * @license Angular v12.0.3
3
3
  * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -412,34 +412,6 @@ function flushMicrotasks() {
412
412
  throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);
413
413
  }
414
414
 
415
- /**
416
- * @license
417
- * Copyright Google LLC All Rights Reserved.
418
- *
419
- * Use of this source code is governed by an MIT-style license that can be
420
- * found in the LICENSE file at https://angular.io/license
421
- */
422
- /**
423
- * Injectable completer that allows signaling completion of an asynchronous test. Used internally.
424
- */
425
- class AsyncTestCompleter {
426
- constructor() {
427
- this._promise = new Promise((res, rej) => {
428
- this._resolve = res;
429
- this._reject = rej;
430
- });
431
- }
432
- done(value) {
433
- this._resolve(value);
434
- }
435
- fail(error, stackTrace) {
436
- this._reject(error);
437
- }
438
- get promise() {
439
- return this._promise;
440
- }
441
- }
442
-
443
415
  /**
444
416
  * @license
445
417
  * Copyright Google LLC All Rights Reserved.
@@ -2359,33 +2331,14 @@ function _getTestBedViewEngine() {
2359
2331
  * })
2360
2332
  * ```
2361
2333
  *
2362
- * Notes:
2363
- * - inject is currently a function because of some Traceur limitation the syntax should
2364
- * eventually
2365
- * becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
2366
- *
2367
2334
  * @publicApi
2368
2335
  */
2369
2336
  function inject(tokens, fn) {
2370
2337
  const testBed = getTestBed();
2371
- if (tokens.indexOf(AsyncTestCompleter) >= 0) {
2372
- // Not using an arrow function to preserve context passed from call site
2373
- return function () {
2374
- // Return an async test method that returns a Promise if AsyncTestCompleter is one of
2375
- // the injected tokens.
2376
- return testBed.compileComponents().then(() => {
2377
- const completer = testBed.inject(AsyncTestCompleter);
2378
- testBed.execute(tokens, fn, this);
2379
- return completer.promise;
2380
- });
2381
- };
2382
- }
2383
- else {
2384
- // Not using an arrow function to preserve context passed from call site
2385
- return function () {
2386
- return testBed.execute(tokens, fn, this);
2387
- };
2388
- }
2338
+ // Not using an arrow function to preserve context passed from call site
2339
+ return function () {
2340
+ return testBed.execute(tokens, fn, this);
2341
+ };
2389
2342
  }
2390
2343
  /**
2391
2344
  * @publicApi