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

[FEATURE] To add the generation of both postman-echo and hopscotch-echo in snapshot.test.js file of packages/template #1373

Open
2 tasks done
ItshMoh opened this issue Feb 22, 2025 · 6 comments · May be fixed by #1476
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@ItshMoh
Copy link
Contributor

ItshMoh commented Feb 22, 2025

Why do we need this improvement?

After the merging of this PR. We need to change the snapshot.test.js file here to include the generation of Readme.md file for both postman-echo.yml file and hopscotch-echo.yml file in two seperate folders. currenlty while running the npm test only the Readme.md file for hopscotch-echo.yml is being generated. We also have to change the snapshot test


    const client = await readFile(path.join(testResultPath, testOutputFile), 'utf8');
    expect(client).toMatchSnapshot();
  });

to look for the README.md also.

How will this change help?

It will make the testing efficient and also easy to verify the generated Readme.md file for both asyncapi document.

Screenshots

No response

How could it be implemented/designed?

The implementation which will help in this issue is implemented in node-js template . we have to follow the given implmentation and try to use it for our use case.

🚧 Breaking changes

No

👀 Have you checked for similar open issues?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

@ItshMoh ItshMoh added the enhancement New feature or request label Feb 22, 2025
Copy link
Contributor

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@ItshMoh
Copy link
Contributor Author

ItshMoh commented Feb 22, 2025

@derberg what are your thoughts on this issue?

@derberg
Copy link
Member

derberg commented Mar 3, 2025

#1368 merged, you can go ahead with this one

@Light13008
Copy link

@derberg @ItshMoh , can check this PR.

#1427

@Light13008
Copy link

@derberg @ItshMoh , can check this PR.

#1427

Here, we

    • Added logic to generate README.md files for both Postman and Hoppscotch clients.
    • Updated the test cases to include snapshot testing for the generated README.md files.
    • Ensured separate output folders for Postman (testResultPathPostman) and Hoppscotch (testResultPathHoppscotch) clients.
    • Verified both the generated WebSocket client files (client-postman.js and client-hoppscotch.js) and their respective README.md files against snapshots.

@ItshMoh
Copy link
Contributor Author

ItshMoh commented Mar 20, 2025

Hey @Light13008 I have already raised a PR For this issue. Now as you have raised a PR, I will be closing my PR. I have reviewed Your PR. I have suggested some changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
3 participants