diff --git a/packages/platform-browser/test/testing_public_spec.ts b/packages/platform-browser/test/testing_public_spec.ts index 8df3b9ba17..ae85c71ecf 100644 --- a/packages/platform-browser/test/testing_public_spec.ts +++ b/packages/platform-browser/test/testing_public_spec.ts @@ -10,7 +10,7 @@ import {CompilerConfig, ResourceLoader} from '@angular/compiler'; import {CUSTOM_ELEMENTS_SCHEMA, Compiler, Component, Directive, Inject, Injectable, Injector, Input, NgModule, Optional, Pipe, SkipSelf, ɵstringify as stringify} from '@angular/core'; import {TestBed, async, fakeAsync, getTestBed, inject, tick, withModule} from '@angular/core/testing'; import {expect} from '@angular/platform-browser/testing/src/matchers'; -import {fixmeIvy, ivyEnabled, obsoleteInIvy} from '@angular/private/testing'; +import {ivyEnabled, modifiedInIvy, obsoleteInIvy, onlyInIvy} from '@angular/private/testing'; // Services, and components for the tests. @@ -919,7 +919,7 @@ Did you run and wait for 'resolveComponentResources()'?` : }); - fixmeIvy(`FW-721: Bindings to unknown properties are not reported as errors`) + modifiedInIvy(`Unknown property error thrown during update mode, not creation mode`) .it('should error on unknown bound properties on custom elements by default', () => { @Component({template: ''}) class ComponentUsingInvalidProperty { @@ -937,6 +937,28 @@ Did you run and wait for 'resolveComponentResources()'?` : restoreJasmineIt(); }); + + onlyInIvy(`Unknown property error thrown during update mode, not creation mode`) + .it('should error on unknown bound properties on custom elements by default', () => { + @Component({template: ''}) + class ComponentUsingInvalidProperty { + } + + const itPromise = patchJasmineIt(); + + expect( + () => it( + 'should fail', withModule( + {declarations: [ComponentUsingInvalidProperty]}, + () => { + const fixture = + TestBed.createComponent(ComponentUsingInvalidProperty); + fixture.detectChanges(); + }))) + .toThrowError(/Can't bind to 'someUnknownProp'/); + + restoreJasmineIt(); + }); }); describe('creating components', () => {