From 3133ed348fbd52f5093ac7e5fdbea9f64f43eb59 Mon Sep 17 00:00:00 2001 From: LU14843 Homeoffice Date: Thu, 3 Jun 2021 12:50:54 +0200 Subject: [PATCH 1/2] fix: rerender with template --- projects/testing-library/src/lib/testing-library.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/testing-library/src/lib/testing-library.ts b/projects/testing-library/src/lib/testing-library.ts index 98d0a2da..637cc6ea 100644 --- a/projects/testing-library/src/lib/testing-library.ts +++ b/projects/testing-library/src/lib/testing-library.ts @@ -242,6 +242,9 @@ function setComponentProperties( Object.defineProperty(fixture.componentInstance, key, { get: descriptor?.get || defaultGetter, set: extendedSetter, + // Allow the property to be defined again later. + // This happens when the component properties are updated after initial render. + configurable: true, }); descriptor?.set?.call(fixture.componentInstance, _value); From 36c4da2d1f22c138843df33b7e8a53bf9ac3b4cf Mon Sep 17 00:00:00 2001 From: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com> Date: Thu, 3 Jun 2021 13:16:24 +0200 Subject: [PATCH 2/2] Update projects/testing-library/src/lib/testing-library.ts --- projects/testing-library/src/lib/testing-library.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/testing-library/src/lib/testing-library.ts b/projects/testing-library/src/lib/testing-library.ts index 637cc6ea..199f5200 100644 --- a/projects/testing-library/src/lib/testing-library.ts +++ b/projects/testing-library/src/lib/testing-library.ts @@ -244,6 +244,7 @@ function setComponentProperties( set: extendedSetter, // Allow the property to be defined again later. // This happens when the component properties are updated after initial render. + // For Jest this is `true` by default, for Karma and a real browser the default is `false` configurable: true, });