Skip to content
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

Added tests for API.ts #79

Merged
merged 12 commits into from
Jul 7, 2023
Merged

Added tests for API.ts #79

merged 12 commits into from
Jul 7, 2023

Conversation

XkijuX
Copy link
Contributor

@XkijuX XkijuX commented May 6, 2023

Added tests for API.ts using undici internal mock-interceptor. All requests to the domain https://top.gg are captured and handled accordingly through this. Everything else is currently blocked. The data used to respond to the API is located in mocks/data.ts and all endpoints are in endpoints.ts. In this file specific tests for further validations on the API route can be added.

During testing, I found some inconsistencies in the code such as variable testing before making the requests. I believe these should be fixed in another pull request.

@netlify
Copy link

netlify bot commented May 6, 2023

Deploy Preview for topgg-node-sdk-docs ready!

Name Link
🔨 Latest commit 84e95eb
🔍 Latest deploy log https://app.netlify.com/sites/topgg-node-sdk-docs/deploys/6457c10469348b00080b7230
😎 Deploy Preview https://deploy-preview-79--topgg-node-sdk-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@XkijuX XkijuX closed this May 6, 2023
@XkijuX XkijuX changed the title Tests Added tests for API.ts May 7, 2023
@XkijuX XkijuX reopened this May 7, 2023
@jpbberry jpbberry self-requested a review May 7, 2023 16:04
@jpbberry jpbberry merged commit ba8103e into Top-gg-Community:master Jul 7, 2023
@jpbberry
Copy link
Member

jpbberry commented Jul 7, 2023

Thanks for the contribution @XkijuX !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants