diff --git a/blocks/identity-block/components/bot-challenge-protection/index.jsx b/blocks/identity-block/components/bot-challenge-protection/index.jsx index 937e98729..e2ecc53ba 100644 --- a/blocks/identity-block/components/bot-challenge-protection/index.jsx +++ b/blocks/identity-block/components/bot-challenge-protection/index.jsx @@ -29,6 +29,7 @@ const BotChallengeProtection = ({ challengeIn, setCaptchaToken, className, captc if (isRecaptchaEnabled && !!siteKey && !!recaptchaVersion) { if (recaptchaVersion === RECAPTCHA_V2) { return ( + /* istanbul ignore next */
diff --git a/blocks/identity-block/components/bot-challenge-protection/reCaptchaV3.js b/blocks/identity-block/components/bot-challenge-protection/reCaptchaV3.js index b1c4fe986..ee869e705 100644 --- a/blocks/identity-block/components/bot-challenge-protection/reCaptchaV3.js +++ b/blocks/identity-block/components/bot-challenge-protection/reCaptchaV3.js @@ -4,10 +4,9 @@ import { useGoogleReCaptcha } from "react-google-recaptcha-v3"; // eslint-disable-next-line import { ARCXP_CAPTCHA } from "./index"; +/* istanbul ignore file */ const RecaptchaV3 = ({ setCaptchaToken, resetRecaptcha }) => { const { executeRecaptcha } = useGoogleReCaptcha(); - - const handleReCaptcha3Verify = useCallback(async () => { if (!executeRecaptcha) { // eslint-disable-next-line diff --git a/blocks/identity-block/utils/useRecaptcha.test.js b/blocks/identity-block/utils/useRecaptcha.test.js index 8e4b3aef9..9419b66f9 100644 --- a/blocks/identity-block/utils/useRecaptcha.test.js +++ b/blocks/identity-block/utils/useRecaptcha.test.js @@ -1,7 +1,6 @@ -import React from "react"; import { waitFor, renderHook } from "@testing-library/react"; -import useRecaptcha from "./useRecaptcha"; import { useIdentity } from "@wpmedia/arc-themes-components"; +import useRecaptcha from "./useRecaptcha"; // Mock setTimeout and clearTimeout jest.useFakeTimers();