Skip to content

Commit b86bfdc

Browse files
committed
Use api_test default arg helper
1 parent 3850989 commit b86bfdc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/resources/handlebars/typescript-fetch/api_test.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe("{{classname}}", () => {
1414
{{#operation}}
1515
test("{{operationId}}", () => {
1616
{{#allParams}}
17-
const {{{paramName}}}: {{^isPrimitiveType}}api.{{/isPrimitiveType}}{{{dataType}}} = {{#example}}{{#isString}}"{{{example}}}"{{/isString}}{{^isString}}{{{example}}}{{/isString}}{{/example}}{{^example}}undefined{{/example}}
17+
const {{{paramName}}}: {{^isPrimitiveType}}api.{{/isPrimitiveType}}{{{dataType}}} = {{>api_test_default_value}}
1818
{{/allParams}}
1919
expect(instance.{{operationId}}({{#allParams}}{{{paramName}}}, {{/allParams}}{})).toBe(null)
2020
})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{#example}}{{#isString}}"{{{example}}}"{{/isString}}{{^isString}}{{#isUuid}}"{{{example}}}"{{/isUuid}}{{^isUuid}}{{{example}}}{{/isUuid}}{{/isString}}{{/example}}{{^example}}undefined{{/example}}

0 commit comments

Comments
 (0)