File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ describe('Gtag wrapping functions', () => {
67
67
insertScriptTag ( customDataLayerName , fakeMeasurementId ) ;
68
68
const scriptTag = findGtagScriptOnPage ( customDataLayerName ) ;
69
69
expect ( scriptTag ) . to . not . be . null ;
70
- expect ( scriptTag ! . src ) . to . equal ( `https://www.googletagmanager.com/gtag/js?l=${ customDataLayerName } &id=${ fakeMeasurementId } ` ) ;
70
+ expect ( scriptTag ! . src ) . to . equal (
71
+ `https://www.googletagmanager.com/gtag/js?l=${ customDataLayerName } &id=${ fakeMeasurementId } `
72
+ ) ;
71
73
} ) ;
72
74
73
75
// The test above essentially already touches this functionality but it is still valuable
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ import {
30
30
initializeV3 ,
31
31
initializeEnterprise ,
32
32
getToken ,
33
- GreCAPTCHATopLevel
33
+ GreCAPTCHATopLevel ,
34
+ RECAPTCHA_ENTERPRISE_URL ,
35
+ RECAPTCHA_URL
34
36
} from './recaptcha' ;
35
37
import * as utils from './util' ;
36
38
import {
@@ -81,7 +83,9 @@ describe('recaptcha', () => {
81
83
82
84
expect ( findgreCAPTCHAScriptsOnPage ( ) . length ) . to . equal ( 0 ) ;
83
85
await initializeV3 ( app , FAKE_SITE_KEY ) ;
84
- expect ( findgreCAPTCHAScriptsOnPage ( ) . length ) . to . equal ( 1 ) ;
86
+ const greCATPCHAScripts = findgreCAPTCHAScriptsOnPage ( ) ;
87
+ expect ( greCATPCHAScripts . length ) . to . equal ( 1 ) ;
88
+ expect ( greCATPCHAScripts [ 0 ] . src ) . to . equal ( RECAPTCHA_URL ) ;
85
89
} ) ;
86
90
87
91
it ( 'creates invisible widget' , async ( ) => {
@@ -128,7 +132,9 @@ describe('recaptcha', () => {
128
132
129
133
expect ( findgreCAPTCHAScriptsOnPage ( ) . length ) . to . equal ( 0 ) ;
130
134
await initializeEnterprise ( app , FAKE_SITE_KEY ) ;
131
- expect ( findgreCAPTCHAScriptsOnPage ( ) . length ) . to . equal ( 1 ) ;
135
+ const greCAPTCHAScripts = findgreCAPTCHAScriptsOnPage ( ) ;
136
+ expect ( greCAPTCHAScripts . length ) . to . equal ( 1 ) ;
137
+ expect ( greCAPTCHAScripts [ 0 ] . src ) . to . equal ( RECAPTCHA_ENTERPRISE_URL ) ;
132
138
} ) ;
133
139
134
140
it ( 'creates invisible widget' , async ( ) => {
You can’t perform that action at this time.
0 commit comments