mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 15:17:53 -05:00
use global.recaptcha instead of global.window.grecaptcha.
This commit is contained in:
parent
bd33b166f7
commit
c9d7293119
1 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ describe('EmailStep test', () => {
|
|||
const formikBag = {
|
||||
setSubmitting: jest.fn()
|
||||
};
|
||||
global.window.grecaptcha = {
|
||||
global.grecaptcha = {
|
||||
execute: jest.fn(),
|
||||
render: jest.fn()
|
||||
};
|
||||
|
@ -80,7 +80,7 @@ describe('EmailStep test', () => {
|
|||
formikWrapper.instance().handleValidSubmit(formData, formikBag);
|
||||
|
||||
expect(formikBag.setSubmitting).toHaveBeenCalledWith(false);
|
||||
expect(global.window.grecaptcha.execute).toHaveBeenCalled();
|
||||
expect(global.grecaptcha.execute).toHaveBeenCalled();
|
||||
});
|
||||
test('captchaSolved sets token and goes to next step', () => {
|
||||
const props = {
|
||||
|
@ -89,7 +89,7 @@ describe('EmailStep test', () => {
|
|||
const formikBag = {
|
||||
setSubmitting: jest.fn()
|
||||
};
|
||||
global.window.grecaptcha = {
|
||||
global.grecaptcha = {
|
||||
execute: jest.fn(),
|
||||
render: jest.fn()
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue