@@ -92,6 +92,7 @@ describe('Form Node', () => {
9292 it ( 'should render form for GET request' , async ( ) => {
9393 const mockResponseObject = {
9494 render : jest . fn ( ) ,
95+ setHeader : jest . fn ( ) ,
9596 } ;
9697 mockWebhookFunctions . getResponseObject . mockReturnValue (
9798 mockResponseObject as unknown as Response ,
@@ -232,10 +233,11 @@ describe('Form Node', () => {
232233 appendAttribution : 'test' ,
233234 formTitle : 'test' ,
234235 message : 'Test Message' ,
235- redirectUrl : '' ,
236+ redirectUrl : undefined ,
236237 title : 'Test Title' ,
237238 responseBinary : encodeURIComponent ( JSON . stringify ( '' ) ) ,
238239 responseText : '' ,
240+ dangerousCustomCss : undefined ,
239241 } ,
240242 } ,
241243 {
@@ -246,10 +248,11 @@ describe('Form Node', () => {
246248 appendAttribution : 'test' ,
247249 formTitle : 'test' ,
248250 message : 'Test Message' ,
249- redirectUrl : '' ,
251+ redirectUrl : undefined ,
250252 title : 'Test Title' ,
251253 responseText : '<div>hey</div><script>alert("hi")</script>' ,
252254 responseBinary : encodeURIComponent ( JSON . stringify ( '' ) ) ,
255+ dangerousCustomCss : undefined ,
253256 } ,
254257 } ,
255258 {
@@ -260,10 +263,11 @@ describe('Form Node', () => {
260263 appendAttribution : 'test' ,
261264 formTitle : 'test' ,
262265 message : 'Test Message' ,
263- redirectUrl : '' ,
266+ redirectUrl : undefined ,
264267 responseBinary : encodeURIComponent ( JSON . stringify ( '' ) ) ,
265268 title : 'Test Title' ,
266269 responseText : 'my text over here' ,
270+ dangerousCustomCss : undefined ,
267271 } ,
268272 } ,
269273 ] ;
@@ -315,6 +319,7 @@ describe('Form Node', () => {
315319 it ( 'should pass customCss to form template' , async ( ) => {
316320 const mockResponseObject = {
317321 render : jest . fn ( ) ,
322+ setHeader : jest . fn ( ) ,
318323 } ;
319324 mockWebhookFunctions . getResponseObject . mockReturnValue (
320325 mockResponseObject as unknown as Response ,
@@ -360,6 +365,8 @@ describe('Form Node', () => {
360365 if ( paramName === 'respondWith' ) return 'text' ;
361366 if ( paramName === 'completionTitle' ) return 'Completion Title' ;
362367 if ( paramName === 'completionMessage' ) return 'Completion Message' ;
368+ if ( paramName === 'redirectUrl' ) return '' ;
369+ if ( paramName === 'responseText' ) return '' ;
363370 if ( paramName === 'options' )
364371 return {
365372 customCss : '.completion-container { color: blue; }' ,
0 commit comments