@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.
- package/bundles/core-testing.umd.js +5 -59
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core.umd.js +2 -2
- package/bundles/core.umd.js.map +1 -1
- package/core.d.ts +187 -10
- package/core.metadata.json +1 -1
- package/esm2015/src/change_detection/differs/iterable_differs.js +1 -1
- package/esm2015/src/debug/debug_node.js +1 -1
- package/esm2015/src/di/injectable.js +1 -1
- package/esm2015/src/metadata/di.js +1 -1
- package/esm2015/src/metadata/do_boostrap.js +1 -1
- package/esm2015/src/version.js +1 -1
- package/esm2015/testing/src/test_bed.js +5 -25
- package/esm2015/testing/src/testing_internal.js +1 -182
- package/fesm2015/core.js +2 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +5 -52
- package/fesm2015/testing.js.map +1 -1
- package/package.json +1 -1
- package/src/r3_symbols.d.ts +1 -1
- package/testing/testing.d.ts +1 -6
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +1 -1
- package/esm2015/testing/src/async_test_completer.js +0 -28
package/fesm2015/testing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.0.
|
|
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
|
-
|
|
2372
|
-
|
|
2373
|
-
return
|
|
2374
|
-
|
|
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
|