@@ -182,10 +182,16 @@ export async function render<SutType, WrapperType = SutType>(
182182 properties ?: Pick <
183183 RenderTemplateOptions < SutType > ,
184184 'componentProperties' | 'componentInputs' | 'componentOutputs' | 'detectChangesOnRender'
185- > ,
185+ > & { partialUpdate ?: boolean } ,
186186 ) => {
187187 const newComponentInputs = properties ?. componentInputs ?? { } ;
188- const changesInComponentInput = update ( fixture , renderedInputKeys , newComponentInputs , setComponentInputs ) ;
188+ const changesInComponentInput = update (
189+ fixture ,
190+ renderedInputKeys ,
191+ newComponentInputs ,
192+ setComponentInputs ,
193+ properties ?. partialUpdate ?? false ,
194+ ) ;
189195 renderedInputKeys = Object . keys ( newComponentInputs ) ;
190196
191197 const newComponentOutputs = properties ?. componentOutputs ?? { } ;
@@ -198,7 +204,13 @@ export async function render<SutType, WrapperType = SutType>(
198204 renderedOutputKeys = Object . keys ( newComponentOutputs ) ;
199205
200206 const newComponentProps = properties ?. componentProperties ?? { } ;
201- const changesInComponentProps = update ( fixture , renderedPropKeys , newComponentProps , setComponentProperties ) ;
207+ const changesInComponentProps = update (
208+ fixture ,
209+ renderedPropKeys ,
210+ newComponentProps ,
211+ setComponentProperties ,
212+ properties ?. partialUpdate ?? false ,
213+ ) ;
202214 renderedPropKeys = Object . keys ( newComponentProps ) ;
203215
204216 if ( hasOnChangesHook ( fixture . componentInstance ) ) {
@@ -387,12 +399,13 @@ function update<SutType>(
387399 fixture : ComponentFixture < SutType > ,
388400 values : RenderTemplateOptions < SutType > [ 'componentInputs' | 'componentProperties' ] ,
389401 ) => void ,
402+ partialUpdate : boolean ,
390403) {
391404 const componentInstance = fixture . componentInstance as Record < string , any > ;
392405 const simpleChanges : SimpleChanges = { } ;
393406
394407 for ( const key of prevRenderedKeys ) {
395- if ( ! Object . prototype . hasOwnProperty . call ( newValues , key ) ) {
408+ if ( ! partialUpdate && ! Object . prototype . hasOwnProperty . call ( newValues , key ) ) {
396409 simpleChanges [ key ] = new SimpleChange ( componentInstance [ key ] , undefined , false ) ;
397410 delete componentInstance [ key ] ;
398411 }
0 commit comments