@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
  */
@@ -733,40 +733,6 @@
733
733
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
734
734
  }
735
735
 
736
- /**
737
- * @license
738
- * Copyright Google LLC All Rights Reserved.
739
- *
740
- * Use of this source code is governed by an MIT-style license that can be
741
- * found in the LICENSE file at https://angular.io/license
742
- */
743
- /**
744
- * Injectable completer that allows signaling completion of an asynchronous test. Used internally.
745
- */
746
- var AsyncTestCompleter = /** @class */ (function () {
747
- function AsyncTestCompleter() {
748
- var _this = this;
749
- this._promise = new Promise(function (res, rej) {
750
- _this._resolve = res;
751
- _this._reject = rej;
752
- });
753
- }
754
- AsyncTestCompleter.prototype.done = function (value) {
755
- this._resolve(value);
756
- };
757
- AsyncTestCompleter.prototype.fail = function (error, stackTrace) {
758
- this._reject(error);
759
- };
760
- Object.defineProperty(AsyncTestCompleter.prototype, "promise", {
761
- get: function () {
762
- return this._promise;
763
- },
764
- enumerable: false,
765
- configurable: true
766
- });
767
- return AsyncTestCompleter;
768
- }());
769
-
770
736
  /**
771
737
  * @license
772
738
  * Copyright Google LLC All Rights Reserved.
@@ -2880,34 +2846,14 @@
2880
2846
  * })
2881
2847
  * ```
2882
2848
  *
2883
- * Notes:
2884
- * - inject is currently a function because of some Traceur limitation the syntax should
2885
- * eventually
2886
- * becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
2887
- *
2888
2849
  * @publicApi
2889
2850
  */
2890
2851
  function inject(tokens, fn) {
2891
2852
  var testBed = getTestBed();
2892
- if (tokens.indexOf(AsyncTestCompleter) >= 0) {
2893
- // Not using an arrow function to preserve context passed from call site
2894
- return function () {
2895
- var _this = this;
2896
- // Return an async test method that returns a Promise if AsyncTestCompleter is one of
2897
- // the injected tokens.
2898
- return testBed.compileComponents().then(function () {
2899
- var completer = testBed.inject(AsyncTestCompleter);
2900
- testBed.execute(tokens, fn, _this);
2901
- return completer.promise;
2902
- });
2903
- };
2904
- }
2905
- else {
2906
- // Not using an arrow function to preserve context passed from call site
2907
- return function () {
2908
- return testBed.execute(tokens, fn, this);
2909
- };
2910
- }
2853
+ // Not using an arrow function to preserve context passed from call site
2854
+ return function () {
2855
+ return testBed.execute(tokens, fn, this);
2856
+ };
2911
2857
  }
2912
2858
  /**
2913
2859
  * @publicApi