Skip to content

Commit dbd468f

Browse files
authored
fix: rerender with template (#223)
1 parent 0d0a905 commit dbd468f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

projects/testing-library/src/lib/testing-library.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ function setComponentProperties<SutType>(
242242
Object.defineProperty(fixture.componentInstance, key, {
243243
get: descriptor?.get || defaultGetter,
244244
set: extendedSetter,
245+
// Allow the property to be defined again later.
246+
// This happens when the component properties are updated after initial render.
247+
// For Jest this is `true` by default, for Karma and a real browser the default is `false`
248+
configurable: true,
245249
});
246250

247251
descriptor?.set?.call(fixture.componentInstance, _value);

0 commit comments

Comments
 (0)