Open wwzeng1 opened 1 year ago
💎 Sweep Pro: I used GPT-4 to create this ticket. You have 55 GPT-4 tickets left.
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
I also found the following external resources that might be helpful:
Summaries of links found in the content:
The page is a pull request on GitHub for the fern-python repository. The pull request (#296) adds pytest to the list of dev dependencies and creates a tests/ directory with a simple no-op test. The generated test includes the syntax required for skipping tests using @pytest.mark.skip. The pull request also includes a link to the pytest documentation for further learning. There are also comments on the pull request, but they are not relevant to the problem.
From looking through the relevant snippets, I decided to make the following modifications:
File Path | Proposed Changes |
---|---|
packages/generators/sdk/cli/src/SdkGeneratorCli.ts |
Modify the SdkGeneratorCli class to include a method for generating a simple no-op test. This method should create a new test file in the tests directory of the generated SDK. The test file should include a simple test that is skipped by default, and a link to Jest's documentation. |
package.json |
Add Jest as a dev dependency. This can be done by adding "jest": "^latest_version" to the "devDependencies" section of the file. |
packages/generators/sdk/cli/src/__test__/fixtures/fern/no-zurg-no-throwing/tests/noop.test.ts |
Create a new test file in the tests directory of the generated SDK. This file should include a simple test that is skipped by default, and a link to Jest's documentation. |
I have created a plan for writing the pull request. I am now working my plan and coding the required changes to address this issue. Here is the planned pull request:
Add test scaffolding to generated SDK
sweep/add-test-scaffolding
Description
This PR adds test scaffolding to the generated SDK. It includes the following changes:
- Added Jest as a dev dependency in the package.json file.
- Created a tests directory in the generated SDK.
- Generated a simple no-op test as a starting point for users.
- Included syntax for skipping tests using Jest's skip method in the generated test file.
- Added a link to Jest's documentation in the generated test file.
Summary
- Modified the SdkGeneratorCli class in the packages/generators/sdk/cli/src/SdkGeneratorCli.ts file to include a method for generating a simple no-op test.
- Added Jest as a dev dependency in the package.json file.
- Created a new test file in the tests directory of the generated SDK.
- The generated test file includes a simple test that is skipped by default, and a link to Jest's documentation for further learning.
I have finished coding the issue. I am now reviewing it for completeness.
Success! 🚀
I'm a bot that handles simple bugs and feature requests but I might make mistakes. Please be kind! Join Our Discord
sweep: retry
sweep: retry
sweep: retry
We recently introduced simple test scaffolding in fern-python. We should do something similar here, potentially with
jest
.Previous PR:
This adds pytest to the list of dev dependencies, as well as creates a tests/ directory with a simple no-op test.
The generated test includes the syntax required for skipping tests (via @pytest.mark.skip) to demonstrate the pytest import. We also include a link to the pytest docs for the user to learn more.