File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed
generators/src/main/java/com/algolia/codegen/cts/tests Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,7 @@ private String escapeBody(String body) {
6060 }
6161
6262 switch (language ) {
63- case "go" : // jsonassert expect % to be formatted, we need to escape them
64- return body .replace ("%" , "%%" );
65- case "dart" : // Same thing but for $
63+ case "dart" : // Escape $ to avoid being used for string interpolation
6664 return body .replace ("$" , "\\ $" );
6765 default :
6866 return body ;
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ func Test{{#lambda.titlecase}}{{clientPrefix}}{{/lambda.titlecase}}E2E_{{#lambda
6161 unionBodyRaw, err := json.Marshal(unionBody)
6262 require.NoError(t, err)
6363
64- jsonassert.New(t).Assertf(string(unionBodyRaw), expectedBodyRaw)
64+ jsonassert.New(t).Assertf(string(unionBodyRaw), "%s", expectedBodyRaw)
6565 { {/body} }
6666 { {/response} }
6767 })
Original file line number Diff line number Diff line change @@ -51,8 +51,7 @@ func Test{{#lambda.titlecase}}{{clientPrefix}}{{/lambda.titlecase}}_{{#lambda.ti
5151 require.Equal(t, "{ {{method} }}", echo.Method)
5252
5353 { {#body} }
54- ja := jsonassert.New(t)
55- ja.Assertf(*echo.Body, `{ {{.} }}`)
54+ jsonassert.New(t).Assertf(*echo.Body, "%s", `{ {{.} }}`)
5655 { {/body} }
5756 { {^body} }
5857 { {#assertNullBody} }
You can’t perform that action at this time.
0 commit comments