-
Notifications
You must be signed in to change notification settings - Fork 21
chore(cts): reuse method template #3385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✔️ Code generated!
|
b228a59
to
27bccc5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
soooooooooo clean!!!
@@ -29,7 +29,7 @@ export function assertValidTimeouts(expectedCount: number): void { | |||
expect(state.duration[0] * 2).to.be.closeTo(state.duration[1], 200); | |||
break; | |||
case 'Swift': | |||
expect(state.duration[0]).to.be.closeTo(state.duration[1], 500); | |||
expect(state.duration[0]).to.be.closeTo(state.duration[1], 800); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(state.duration[0]).to.be.closeTo(state.duration[1], 800); | |
expect(state.duration[0]).to.be.closeTo(state.duration[1], 9000); |
let's preshot
@@ -140,7 +140,7 @@ When writing your template, here is a list of variables accessible from `mustach | |||
"method": "the method to call on the API Client", | |||
"testName": "the descriptive name test (default to `method`)", | |||
"testIndex": "the index of the test to avoid duplicate function name", | |||
"hasParameters": "true if the method has parameters, useful for `GET` requests", | |||
"hasParams": "true if the method has parameters, useful for `GET` requests", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes me think we should use a json schema here instead of json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I can give it a try in another PR
🧭 What and Why
We can reuse the
method
template in all languages, and for all tests suites, instead of copy pasting it 4 times.Also simplify the logic and remove unused props, to make it more similar to the requests test suite