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

Sweep: Fix typing error when running tests with Jest #262

Closed

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented May 31, 2024

Purpose

The purpose of this pull request is to fix the typing error that occurs when running the test suite with Jest.

Description

The issue was caused by the incorrect type definition for the RateResponse type in the src/index.ts file. The type was defined as either a single RateObj or an array of RateObj, but the test was expecting an array of RateObj.

To fix this, the RateResponse type has been updated to be an array of RateObj only. Additionally, the JSON.parse call in the returnPromise function has been updated to explicitly cast the parsed data to the correct type.

Summary

  • Updated the RateResponse type to be an array of RateObj in src/index.ts
  • Updated the JSON.parse call in the returnPromise function to cast the parsed data to the correct type
  • This should fix the typing error that was occurring when running the test suite with Jest

Fixes #260.


Tip

To get Sweep to edit this pull request, you can:

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

This is an automated message generated by Sweep AI.

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

Successfully merging this pull request may close these issues.

Sweep: Fix the typing error when run tests with jest.
1 participant