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

Fetcher refactor #3977

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Fetcher refactor #3977

wants to merge 2 commits into from

Conversation

williamluer
Copy link
Contributor

@williamluer williamluer commented Jul 2, 2024

  • Add unit tests to Fetcher
  • Refactors Fetcher
  • Splits Fetcher up into multiple files

TODO:

  • Fix environment with jest
  • Refactor to run correct tests with environment
  • Move code to voyager
  • Figure out why tests dont run
  • Fix jsdom tests
  • Add fetchImpl e2e tests
  • Add FormDataWrapper tests

Current Issues:

  • --env=node works but --env=jsdom fails due to an issue with Response
  • Need to refactor tests to remove setNode and setBrowser and use RUNTIME created from the jest environment

There are still more things I would like to test:

  • end to end fetchImpl tests. There are 6 return options but only 1 is tested.
  • FormDataWrapper tests

Notes:

  • Run tests with yarn workspace @fern-typescript/fetcher test
  • Tests are currently failing to execute but I have not had time to investigate
Error: Qualified path resolution failed: we looked for the following paths, but none could be accessed.

Source path: /Users/williamluer/code/fern/fern/generators/typescript/babel.config.json
Not found: /Users/williamluer/code/fern/fern/generators/typescript/babel.config.json
Not found: /Users/williamluer/code/fern/fern/generators/typescript/babel.config.json.js
Not found: /Users/williamluer/code/fern/fern/generators/typescript/babel.config.json.json
Not found: /Users/williamluer/code/fern/fern/generators/typescript/babel.config.json.node
Not found: /Users/williamluer/code/fern/fern/generators/typescript/babel.config.json.ts
Not found: /Users/williamluer/code/fern/fern/generators/typescript/babel.config.json.tsx
Not found: /Users/williamluer/code/fern/fern/generators/typescript/babel.config.json.cjs
Not found: /Users/williamluer/code/fern/fern/generators/typescript/babel.config.json.jsx

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

Successfully merging this pull request may close these issues.

None yet

1 participant