-
Notifications
You must be signed in to change notification settings - Fork 42
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
Oatts throws an error while running mocha command #7
Comments
Hi @Hiral-Dadhaniya thanks for using oatts and opening an issue. oatts uses a rest testing framework called chakram to execute requests and assert on responses. If you take a look at your generated code, you'll notice a In this scenario it looks like the test timeout used is 2000ms (the default), and the test is being preempted. A couple of possible scenarios might be that the request is taking longer than the allotted timeout to complete, somehow the server is not reachable but the client's timeout for this is longer than the test's timeout, or there could even be an issue with how mocha is attempting to resolve the promise (i believe this would be out of the scope of this code base and we'd need to dig deeper to prove it). I'd ask you to please raise the timeout by running the tests with a Thank you! |
Hi @noahdietz thank you for quick response. |
OK glad the timeout flag helped. If I understand the question, you want to know how |
Yes, Sure. |
I am going to close this issue as we have resolved the issue. Thanks! |
Hi,
As given in the github documentation(https://github.com/google/oatts), following command generates the .js file for mentioned specification.
oatts generate -s ./path/to/openapi.yaml -w ./output/dir
For next steps, while running them using mocha (mocha --recursive (test directory)), this gives me following error for JS file.
"Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves."
Is there a way to resolve this? Which rules(validation) does Oatts uses?
Thanks.
The text was updated successfully, but these errors were encountered: