Skip to content

Commit

Permalink
fix(reMount test): coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKarajohn committed Sep 14, 2022
1 parent 201e758 commit c322b6c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/provider/ReCaptchaProvider.test/reMount.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,20 @@ describe('ReCaptchaProvider', (): void => {
// wrap our dummy component with the context and get its props
DummyComponentWithContext = withContext(DummyComponent);
// new render to trigger a new mount with all optional props
await act(async () => {
rr = render(
<ReCaptchaProvider
siteKeyV2={EProps.siteKeyV2}
siteKeyV3={EProps.siteKeyV3}
langCode={EProps.langCode}
hideV3Badge={true}
>
<div>
<DummyComponentWithContext dummy="dummy-prop" otherDummy={55} />
</div>
</ReCaptchaProvider>
);

rr = render(
<ReCaptchaProvider
siteKeyV2={EProps.siteKeyV2}
siteKeyV3={EProps.siteKeyV3}
langCode={EProps.langCode}
hideV3Badge={true}
>
<div>
<DummyComponentWithContext dummy="dummy-prop" otherDummy={55} />
</div>
</ReCaptchaProvider>
);
await act(async () => {
// emulate the onload call by the google api
if (typeof window.GoogleReCaptcha_onload === 'function') {
window.GoogleReCaptcha_onload();
Expand Down

0 comments on commit c322b6c

Please sign in to comment.