@angular/core 14.0.0-next.13 → 14.0.0-next.16
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/esm2020/src/application_ref.mjs +219 -47
- package/esm2020/src/change_detection/change_detector_ref.mjs +3 -3
- package/esm2020/src/change_detection/differs/default_iterable_differ.mjs +2 -2
- package/esm2020/src/change_detection/differs/default_keyvalue_differ.mjs +2 -2
- package/esm2020/src/change_detection/differs/iterable_differs.mjs +2 -2
- package/esm2020/src/change_detection/differs/keyvalue_differs.mjs +2 -2
- package/esm2020/src/compiler/compiler_facade.mjs +2 -2
- package/esm2020/src/compiler/compiler_facade_interface.mjs +7 -1
- package/esm2020/src/core.mjs +2 -2
- package/esm2020/src/core_private_export.mjs +2 -2
- package/esm2020/src/core_render3_private_export.mjs +4 -3
- package/esm2020/src/debug/debug_node.mjs +5 -5
- package/esm2020/src/di/create_injector.mjs +35 -0
- package/esm2020/src/di/index.mjs +4 -1
- package/esm2020/src/di/initializer_token.mjs +16 -0
- package/esm2020/src/di/injection_token.mjs +7 -1
- package/esm2020/src/di/injector.mjs +3 -3
- package/esm2020/src/di/injector_compatibility.mjs +4 -6
- package/esm2020/src/di/injector_token.mjs +2 -2
- package/esm2020/src/di/interface/defs.mjs +1 -1
- package/esm2020/src/di/interface/provider.mjs +1 -1
- package/esm2020/src/di/internal_tokens.mjs +10 -0
- package/esm2020/src/di/jit/injectable.mjs +3 -3
- package/esm2020/src/di/metadata.mjs +6 -6
- package/esm2020/src/di/provider_collection.mjs +224 -0
- package/esm2020/src/di/r3_injector.mjs +87 -157
- package/esm2020/src/di/scope.mjs +1 -1
- package/esm2020/src/errors.mjs +1 -1
- package/esm2020/src/linker/component_factory.mjs +1 -1
- package/esm2020/src/linker/ng_module_factory.mjs +1 -1
- package/esm2020/src/linker/template_ref.mjs +3 -3
- package/esm2020/src/linker/view_container_ref.mjs +15 -12
- package/esm2020/src/metadata/directives.mjs +1 -1
- package/esm2020/src/metadata/ng_module.mjs +1 -1
- package/esm2020/src/metadata.mjs +1 -1
- package/esm2020/src/render3/assert.mjs +3 -3
- package/esm2020/src/render3/collect_native_nodes.mjs +5 -5
- package/esm2020/src/render3/component.mjs +8 -8
- package/esm2020/src/render3/component_ref.mjs +15 -7
- package/esm2020/src/render3/context_discovery.mjs +4 -4
- package/esm2020/src/render3/definition.mjs +16 -20
- package/esm2020/src/render3/di.mjs +21 -21
- package/esm2020/src/render3/di_setup.mjs +7 -6
- package/esm2020/src/render3/errors.mjs +22 -4
- package/esm2020/src/render3/errors_di.mjs +10 -7
- package/esm2020/src/render3/features/inherit_definition_feature.mjs +4 -3
- package/esm2020/src/render3/features/standalone_feature.mjs +70 -0
- package/esm2020/src/render3/hooks.mjs +19 -19
- package/esm2020/src/render3/i18n/i18n_apply.mjs +16 -16
- package/esm2020/src/render3/i18n/i18n_debug.mjs +9 -9
- package/esm2020/src/render3/i18n/i18n_insert_before_index.mjs +2 -2
- package/esm2020/src/render3/i18n/i18n_parse.mjs +14 -14
- package/esm2020/src/render3/i18n/i18n_util.mjs +7 -7
- package/esm2020/src/render3/index.mjs +5 -4
- package/esm2020/src/render3/instructions/advance.mjs +3 -3
- package/esm2020/src/render3/instructions/all.mjs +2 -1
- package/esm2020/src/render3/instructions/change_detection.mjs +2 -2
- package/esm2020/src/render3/instructions/element.mjs +26 -6
- package/esm2020/src/render3/instructions/element_container.mjs +3 -3
- package/esm2020/src/render3/instructions/i18n.mjs +2 -2
- package/esm2020/src/render3/instructions/listener.mjs +7 -7
- package/esm2020/src/render3/instructions/lview_debug.mjs +26 -26
- package/esm2020/src/render3/instructions/projection.mjs +3 -3
- package/esm2020/src/render3/instructions/shared.mjs +94 -71
- package/esm2020/src/render3/instructions/styling.mjs +5 -5
- package/esm2020/src/render3/instructions/template.mjs +3 -3
- package/esm2020/src/render3/instructions/text.mjs +2 -2
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/interfaces/node.mjs +10 -10
- package/esm2020/src/render3/interfaces/public_definitions.mjs +1 -1
- package/esm2020/src/render3/interfaces/styling.mjs +18 -18
- package/esm2020/src/render3/interfaces/type_checks.mjs +5 -5
- package/esm2020/src/render3/interfaces/view.mjs +1 -1
- package/esm2020/src/render3/jit/directive.mjs +135 -13
- package/esm2020/src/render3/jit/environment.mjs +2 -1
- package/esm2020/src/render3/jit/module.mjs +84 -27
- package/esm2020/src/render3/jit/partial.mjs +8 -8
- package/esm2020/src/render3/jit/pipe.mjs +4 -6
- package/esm2020/src/render3/jit/util.mjs +15 -0
- package/esm2020/src/render3/ng_module_ref.mjs +34 -4
- package/esm2020/src/render3/node_assert.mjs +8 -8
- package/esm2020/src/render3/node_manipulation.mjs +40 -40
- package/esm2020/src/render3/node_manipulation_i18n.mjs +3 -3
- package/esm2020/src/render3/node_selector_matcher.mjs +28 -28
- package/esm2020/src/render3/pipe.mjs +2 -2
- package/esm2020/src/render3/query.mjs +12 -12
- package/esm2020/src/render3/state.mjs +5 -5
- package/esm2020/src/render3/styling/class_differ.mjs +3 -3
- package/esm2020/src/render3/styling/static_styling.mjs +3 -3
- package/esm2020/src/render3/styling/styling_parser.mjs +17 -17
- package/esm2020/src/render3/util/attrs_utils.mjs +10 -10
- package/esm2020/src/render3/util/discovery_utils.mjs +4 -4
- package/esm2020/src/render3/util/injector_utils.mjs +4 -4
- package/esm2020/src/render3/util/view_traversal_utils.mjs +2 -2
- package/esm2020/src/render3/util/view_utils.mjs +3 -3
- package/esm2020/src/render3/view_ref.mjs +6 -6
- package/esm2020/src/sanitization/bypass.mjs +7 -7
- package/esm2020/src/sanitization/sanitization.mjs +10 -10
- package/esm2020/src/util/global.mjs +8 -8
- package/esm2020/src/util/raf.mjs +1 -1
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2020/testing/src/r3_test_bed.mjs +34 -6
- package/esm2020/testing/src/r3_test_bed_compiler.mjs +45 -4
- package/esm2020/testing/src/resolvers.mjs +1 -1
- package/esm2020/testing/src/test_bed_common.mjs +5 -1
- package/fesm2015/core.mjs +1591 -856
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +84 -8
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +1589 -857
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +81 -8
- package/fesm2020/testing.mjs.map +1 -1
- package/{core.d.ts → index.d.ts} +14760 -14612
- package/package.json +4 -4
- package/testing/{testing.d.ts → index.d.ts} +565 -536
- package/testing/package.json +0 -9
package/fesm2015/testing.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.16
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { getDebugNode, RendererFactory2, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetInjectableDef, resolveForwardRef, ɵNG_COMP_DEF, ɵRender3NgModuleRef, ApplicationInitStatus, LOCALE_ID, ɵDEFAULT_LOCALE_ID, ɵsetLocaleId, ɵRender3ComponentFactory, ɵcompileComponent, ɵNG_DIR_DEF, ɵcompileDirective, ɵNG_PIPE_DEF, ɵcompilePipe, ɵNG_MOD_DEF, ɵtransitiveScopesFor, ɵpatchComponentDefWithScope, ɵNG_INJ_DEF, ɵcompileNgModuleDefs, NgZone, Compiler, COMPILER_OPTIONS, ɵNgModuleFactory, ModuleWithComponentFactories, InjectionToken, Injector, InjectFlags, ɵsetAllowDuplicateNgModuleIdsForTest, ɵresetCompiledComponents, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
|
|
7
|
+
import { getDebugNode, RendererFactory2, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetInjectableDef, resolveForwardRef, ɵNG_COMP_DEF, ɵRender3NgModuleRef, ApplicationInitStatus, LOCALE_ID, ɵDEFAULT_LOCALE_ID, ɵsetLocaleId, ɵRender3ComponentFactory, ɵcompileComponent, ɵNG_DIR_DEF, ɵcompileDirective, ɵNG_PIPE_DEF, ɵcompilePipe, ɵNG_MOD_DEF, ɵtransitiveScopesFor, ɵpatchComponentDefWithScope, ɵNG_INJ_DEF, ɵcompileNgModuleDefs, NgZone, Compiler, COMPILER_OPTIONS, ɵNgModuleFactory, ModuleWithComponentFactories, InjectionToken, Injector, InjectFlags, ɵsetAllowDuplicateNgModuleIdsForTest, ɵresetCompiledComponents, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
|
|
8
8
|
import { __awaiter } from 'tslib';
|
|
9
9
|
import { ResourceLoader } from '@angular/compiler';
|
|
10
10
|
|
|
@@ -831,17 +831,28 @@ class R3TestBedCompiler {
|
|
|
831
831
|
this.queueTypesFromModulesArray([ngModule]);
|
|
832
832
|
}
|
|
833
833
|
overrideComponent(component, override) {
|
|
834
|
+
this.verifyNoStandaloneFlagOverrides(component, override);
|
|
834
835
|
this.resolvers.component.addOverride(component, override);
|
|
835
836
|
this.pendingComponents.add(component);
|
|
836
837
|
}
|
|
837
838
|
overrideDirective(directive, override) {
|
|
839
|
+
this.verifyNoStandaloneFlagOverrides(directive, override);
|
|
838
840
|
this.resolvers.directive.addOverride(directive, override);
|
|
839
841
|
this.pendingDirectives.add(directive);
|
|
840
842
|
}
|
|
841
843
|
overridePipe(pipe, override) {
|
|
844
|
+
this.verifyNoStandaloneFlagOverrides(pipe, override);
|
|
842
845
|
this.resolvers.pipe.addOverride(pipe, override);
|
|
843
846
|
this.pendingPipes.add(pipe);
|
|
844
847
|
}
|
|
848
|
+
verifyNoStandaloneFlagOverrides(type, override) {
|
|
849
|
+
var _a, _b, _c;
|
|
850
|
+
if (((_a = override.add) === null || _a === void 0 ? void 0 : _a.hasOwnProperty('standalone')) || ((_b = override.set) === null || _b === void 0 ? void 0 : _b.hasOwnProperty('standalone')) ||
|
|
851
|
+
((_c = override.remove) === null || _c === void 0 ? void 0 : _c.hasOwnProperty('standalone'))) {
|
|
852
|
+
throw new Error(`An override for the ${type.name} class has the \`standalone\` flag. ` +
|
|
853
|
+
`Changing the \`standalone\` flag via TestBed overrides is not supported.`);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
845
856
|
overrideProvider(token, provider) {
|
|
846
857
|
let providerDef;
|
|
847
858
|
if (provider.useFactory !== undefined) {
|
|
@@ -1060,12 +1071,29 @@ class R3TestBedCompiler {
|
|
|
1060
1071
|
this.seenDirectives.clear();
|
|
1061
1072
|
}
|
|
1062
1073
|
applyProviderOverridesToModule(moduleType) {
|
|
1074
|
+
var _a;
|
|
1063
1075
|
if (this.moduleProvidersOverridden.has(moduleType)) {
|
|
1064
1076
|
return;
|
|
1065
1077
|
}
|
|
1066
1078
|
this.moduleProvidersOverridden.add(moduleType);
|
|
1079
|
+
// NOTE: the line below triggers JIT compilation of the module injector,
|
|
1080
|
+
// which also invokes verification of the NgModule semantics, which produces
|
|
1081
|
+
// detailed error messages. The fact that the code relies on this line being
|
|
1082
|
+
// present here is suspicious and should be refactored in a way that the line
|
|
1083
|
+
// below can be moved (for ex. after an early exit check below).
|
|
1067
1084
|
const injectorDef = moduleType[ɵNG_INJ_DEF];
|
|
1068
|
-
|
|
1085
|
+
// No provider overrides, exit early.
|
|
1086
|
+
if (this.providerOverridesByToken.size === 0)
|
|
1087
|
+
return;
|
|
1088
|
+
if (isStandaloneComponent(moduleType)) {
|
|
1089
|
+
// Visit all component dependencies and override providers there.
|
|
1090
|
+
const def = getComponentDef(moduleType);
|
|
1091
|
+
const dependencies = maybeUnwrapFn((_a = def.dependencies) !== null && _a !== void 0 ? _a : []);
|
|
1092
|
+
for (const dependency of dependencies) {
|
|
1093
|
+
this.applyProviderOverridesToModule(dependency);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
else {
|
|
1069
1097
|
const providers = [
|
|
1070
1098
|
...injectorDef.providers,
|
|
1071
1099
|
...(this.providerOverridesByModule.get(moduleType) || [])
|
|
@@ -1140,8 +1168,11 @@ class R3TestBedCompiler {
|
|
|
1140
1168
|
// real module, which was imported. This pattern is understood to mean that the component
|
|
1141
1169
|
// should use its original scope, but that the testing module should also contain the
|
|
1142
1170
|
// component in its scope.
|
|
1143
|
-
|
|
1144
|
-
|
|
1171
|
+
//
|
|
1172
|
+
// Note: standalone components have no associated NgModule, so the `moduleType` can be `null`.
|
|
1173
|
+
if (moduleType !== null &&
|
|
1174
|
+
(!this.componentToModuleScope.has(type) ||
|
|
1175
|
+
this.componentToModuleScope.get(type) === TestingModuleOverride.DECLARATION)) {
|
|
1145
1176
|
this.componentToModuleScope.set(type, moduleType);
|
|
1146
1177
|
}
|
|
1147
1178
|
return;
|
|
@@ -1166,6 +1197,7 @@ class R3TestBedCompiler {
|
|
|
1166
1197
|
// encountered. In some test setups, this caching resulted in 10X runtime improvement.
|
|
1167
1198
|
const processedNgModuleDefs = new Set();
|
|
1168
1199
|
const queueTypesFromModulesArrayRecur = (arr) => {
|
|
1200
|
+
var _a;
|
|
1169
1201
|
for (const value of arr) {
|
|
1170
1202
|
if (Array.isArray(value)) {
|
|
1171
1203
|
queueTypesFromModulesArrayRecur(value);
|
|
@@ -1185,6 +1217,11 @@ class R3TestBedCompiler {
|
|
|
1185
1217
|
else if (isModuleWithProviders(value)) {
|
|
1186
1218
|
queueTypesFromModulesArrayRecur([value.ngModule]);
|
|
1187
1219
|
}
|
|
1220
|
+
else if (isStandaloneComponent(value)) {
|
|
1221
|
+
this.queueType(value, null);
|
|
1222
|
+
const def = getComponentDef(value);
|
|
1223
|
+
queueTypesFromModulesArrayRecur(maybeUnwrapFn((_a = def.dependencies) !== null && _a !== void 0 ? _a : []));
|
|
1224
|
+
}
|
|
1188
1225
|
}
|
|
1189
1226
|
};
|
|
1190
1227
|
queueTypesFromModulesArrayRecur(arr);
|
|
@@ -1402,6 +1439,14 @@ function initResolvers() {
|
|
|
1402
1439
|
pipe: new PipeResolver()
|
|
1403
1440
|
};
|
|
1404
1441
|
}
|
|
1442
|
+
function isStandaloneComponent(value) {
|
|
1443
|
+
const def = getComponentDef(value);
|
|
1444
|
+
return !!(def === null || def === void 0 ? void 0 : def.standalone);
|
|
1445
|
+
}
|
|
1446
|
+
function getComponentDef(value) {
|
|
1447
|
+
var _a;
|
|
1448
|
+
return (_a = value.ɵcmp) !== null && _a !== void 0 ? _a : null;
|
|
1449
|
+
}
|
|
1405
1450
|
function hasNgModuleDef(value) {
|
|
1406
1451
|
return value.hasOwnProperty('ɵmod');
|
|
1407
1452
|
}
|
|
@@ -1480,6 +1525,10 @@ class R3TestCompiler {
|
|
|
1480
1525
|
*/
|
|
1481
1526
|
/** Whether test modules should be torn down by default. */
|
|
1482
1527
|
const TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT = true;
|
|
1528
|
+
/** Whether unknown elements in templates should throw by default. */
|
|
1529
|
+
const THROW_ON_UNKNOWN_ELEMENTS_DEFAULT = false;
|
|
1530
|
+
/** Whether unknown properties in templates should throw by default. */
|
|
1531
|
+
const THROW_ON_UNKNOWN_PROPERTIES_DEFAULT = false;
|
|
1483
1532
|
/**
|
|
1484
1533
|
* An abstract class for inserting the root test component element in a platform independent way.
|
|
1485
1534
|
*
|
|
@@ -1644,6 +1693,8 @@ class TestBedRender3 {
|
|
|
1644
1693
|
throw new Error('Cannot set base providers because it has already been called');
|
|
1645
1694
|
}
|
|
1646
1695
|
TestBedRender3._environmentTeardownOptions = options === null || options === void 0 ? void 0 : options.teardown;
|
|
1696
|
+
TestBedRender3._environmentErrorOnUnknownElementsOption = options === null || options === void 0 ? void 0 : options.errorOnUnknownElements;
|
|
1697
|
+
TestBedRender3._environmentErrorOnUnknownPropertiesOption = options === null || options === void 0 ? void 0 : options.errorOnUnknownProperties;
|
|
1647
1698
|
this.platform = platform;
|
|
1648
1699
|
this.ngModule = ngModule;
|
|
1649
1700
|
this._compiler = new R3TestBedCompiler(this.platform, this.ngModule);
|
|
@@ -1667,12 +1718,17 @@ class TestBedRender3 {
|
|
|
1667
1718
|
ɵsetAllowDuplicateNgModuleIdsForTest(false);
|
|
1668
1719
|
}
|
|
1669
1720
|
resetTestingModule() {
|
|
1721
|
+
var _a, _b;
|
|
1670
1722
|
this.checkGlobalCompilationFinished();
|
|
1671
1723
|
ɵresetCompiledComponents();
|
|
1672
1724
|
if (this._compiler !== null) {
|
|
1673
1725
|
this.compiler.restoreOriginalState();
|
|
1674
1726
|
}
|
|
1675
1727
|
this._compiler = new R3TestBedCompiler(this.platform, this.ngModule);
|
|
1728
|
+
// Restore the previous value of the "error on unknown elements" option
|
|
1729
|
+
ɵsetUnknownElementStrictMode((_a = this._previousErrorOnUnknownElementsOption) !== null && _a !== void 0 ? _a : THROW_ON_UNKNOWN_ELEMENTS_DEFAULT);
|
|
1730
|
+
// Restore the previous value of the "error on unknown properties" option
|
|
1731
|
+
ɵsetUnknownPropertyStrictMode((_b = this._previousErrorOnUnknownPropertiesOption) !== null && _b !== void 0 ? _b : THROW_ON_UNKNOWN_PROPERTIES_DEFAULT);
|
|
1676
1732
|
// We have to chain a couple of try/finally blocks, because each step can
|
|
1677
1733
|
// throw errors and we don't want it to interrupt the next step and we also
|
|
1678
1734
|
// want an error to be thrown at the end.
|
|
@@ -1688,6 +1744,8 @@ class TestBedRender3 {
|
|
|
1688
1744
|
finally {
|
|
1689
1745
|
this._testModuleRef = null;
|
|
1690
1746
|
this._instanceTeardownOptions = undefined;
|
|
1747
|
+
this._instanceErrorOnUnknownElementsOption = undefined;
|
|
1748
|
+
this._instanceErrorOnUnknownPropertiesOption = undefined;
|
|
1691
1749
|
}
|
|
1692
1750
|
}
|
|
1693
1751
|
}
|
|
@@ -1706,9 +1764,17 @@ class TestBedRender3 {
|
|
|
1706
1764
|
// their components scoped properly. See the `checkGlobalCompilationFinished` function
|
|
1707
1765
|
// description for additional info.
|
|
1708
1766
|
this.checkGlobalCompilationFinished();
|
|
1709
|
-
// Always re-assign the
|
|
1710
|
-
// This ensures that we don't carry
|
|
1767
|
+
// Always re-assign the options, even if they're undefined.
|
|
1768
|
+
// This ensures that we don't carry them between tests.
|
|
1711
1769
|
this._instanceTeardownOptions = moduleDef.teardown;
|
|
1770
|
+
this._instanceErrorOnUnknownElementsOption = moduleDef.errorOnUnknownElements;
|
|
1771
|
+
this._instanceErrorOnUnknownPropertiesOption = moduleDef.errorOnUnknownProperties;
|
|
1772
|
+
// Store the current value of the strict mode option,
|
|
1773
|
+
// so we can restore it later
|
|
1774
|
+
this._previousErrorOnUnknownElementsOption = ɵgetUnknownElementStrictMode();
|
|
1775
|
+
ɵsetUnknownElementStrictMode(this.shouldThrowErrorOnUnknownElements());
|
|
1776
|
+
this._previousErrorOnUnknownPropertiesOption = ɵgetUnknownPropertyStrictMode();
|
|
1777
|
+
ɵsetUnknownPropertyStrictMode(this.shouldThrowErrorOnUnknownProperties());
|
|
1712
1778
|
this.compiler.configureTestingModule(moduleDef);
|
|
1713
1779
|
}
|
|
1714
1780
|
compileComponents() {
|
|
@@ -1764,7 +1830,7 @@ class TestBedRender3 {
|
|
|
1764
1830
|
testComponentRenderer.insertRootElement(rootElId);
|
|
1765
1831
|
const componentDef = type.ɵcmp;
|
|
1766
1832
|
if (!componentDef) {
|
|
1767
|
-
throw new Error(`It looks like '${ɵstringify(type)}' has not been
|
|
1833
|
+
throw new Error(`It looks like '${ɵstringify(type)}' has not been compiled.`);
|
|
1768
1834
|
}
|
|
1769
1835
|
// TODO: Don't cast as `InjectionToken<boolean>`, proper type is boolean[]
|
|
1770
1836
|
const noNgZone = this.inject(ComponentFixtureNoNgZone, false);
|
|
@@ -1857,6 +1923,16 @@ class TestBedRender3 {
|
|
|
1857
1923
|
// Otherwise use the configured behavior or default to rethrowing.
|
|
1858
1924
|
return (_b = (_a = instanceOptions === null || instanceOptions === void 0 ? void 0 : instanceOptions.rethrowErrors) !== null && _a !== void 0 ? _a : environmentOptions === null || environmentOptions === void 0 ? void 0 : environmentOptions.rethrowErrors) !== null && _b !== void 0 ? _b : this.shouldTearDownTestingModule();
|
|
1859
1925
|
}
|
|
1926
|
+
shouldThrowErrorOnUnknownElements() {
|
|
1927
|
+
var _a, _b;
|
|
1928
|
+
// Check if a configuration has been provided to throw when an unknown element is found
|
|
1929
|
+
return (_b = (_a = this._instanceErrorOnUnknownElementsOption) !== null && _a !== void 0 ? _a : TestBedRender3._environmentErrorOnUnknownElementsOption) !== null && _b !== void 0 ? _b : THROW_ON_UNKNOWN_ELEMENTS_DEFAULT;
|
|
1930
|
+
}
|
|
1931
|
+
shouldThrowErrorOnUnknownProperties() {
|
|
1932
|
+
var _a, _b;
|
|
1933
|
+
// Check if a configuration has been provided to throw when an unknown property is found
|
|
1934
|
+
return (_b = (_a = this._instanceErrorOnUnknownPropertiesOption) !== null && _a !== void 0 ? _a : TestBedRender3._environmentErrorOnUnknownPropertiesOption) !== null && _b !== void 0 ? _b : THROW_ON_UNKNOWN_PROPERTIES_DEFAULT;
|
|
1935
|
+
}
|
|
1860
1936
|
shouldTearDownTestingModule() {
|
|
1861
1937
|
var _a, _b, _c, _d;
|
|
1862
1938
|
return (_d = (_b = (_a = this._instanceTeardownOptions) === null || _a === void 0 ? void 0 : _a.destroyAfterEach) !== null && _b !== void 0 ? _b : (_c = TestBedRender3._environmentTeardownOptions) === null || _c === void 0 ? void 0 : _c.destroyAfterEach) !== null && _d !== void 0 ? _d : TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT;
|