Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dbd468f

Browse files
fix: rerender with template (testing-library#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)

AltStyle によって変換されたページ (->オリジナル) /