Skip to content

feat: tests#3

Merged
replitmicromanager[bot] merged 1 commit into
mainfrom
03-17-feat_tests
Mar 18, 2025
Merged

feat: tests#3
replitmicromanager[bot] merged 1 commit into
mainfrom
03-17-feat_tests

Conversation

@darshkpatel
Copy link
Copy Markdown
Collaborator

@darshkpatel darshkpatel commented Mar 18, 2025

TL;DR

Added test suite with Vitest and development documentation

I also have a stacked PR adding CI to run these tests 😃

Copy link
Copy Markdown

@replitmicromanager replitmicromanager Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is too large for a good review. Requesting changes.

If there is no way to split this up, @lhchavez can approve.

Copy link
Copy Markdown
Collaborator Author

darshkpatel commented Mar 18, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@darshkpatel darshkpatel force-pushed the 03-17-feat_tests branch 2 times, most recently from 22c5f8c to c12bffc Compare March 18, 2025 04:41
@darshkpatel darshkpatel marked this pull request as ready for review March 18, 2025 04:42
@darshkpatel darshkpatel requested a review from masad-frost March 18, 2025 04:46
Copy link
Copy Markdown
Member

@masad-frost masad-frost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good place for snapshot tests 👍

@darshkpatel darshkpatel changed the base branch from 03-17-feat_implement_plugin to graphite-base/3 March 18, 2025 20:31
darshkpatel added a commit that referenced this pull request Mar 18, 2025
**Part of a [stack of PRs](#2 (comment)

Allows us to do this now:
<img width="611" alt="Screenshot 2025-03-18 at 10 15 31 AM" src="https://github.com/user-attachments/assets/b3dba9eb-ea85-4408-9200-0401a2e2d159" />


**Main Changes in this PR:**

- Ports our [existing plugin](https://github.com/replit/repl-it-web/blob/main/graphql-codegen-pql-plugin/persisted-query-manifest-plugin.ts) while cleaning it up and making it more structured
-  also adding support for `includeAlgorithmPrefix` to help match the [graphql-over-http spec](https://github.com/graphql/graphql-over-http/blob/52d56fb36d51c17e08a920510a23bdc2f6a720be/spec/Appendix%20A%20--%20Persisted%20Documents.md#sha256-hex-document-identifier) this is still not implemented completely in the apollo graphql client so keeping it defaulted to false for now - eg. [relay decided to use md5 hashes](https://relay.dev/docs/guides/persisted-queries/)

- core logic remains the same, doing cosmetic changes to make the package more maintainable 

- Test coverage in stacked PR: #3 

- Did a quick sanity check by enabling the `includeAlgorithmPrefix` option and then turning it off, matches the existing generated manifest  ( Note: I plan to use it without the algorithm prefix. )

![Screenshot 2025-03-17 at 5 00 07 PM](https://github.com/user-attachments/assets/ddc0893d-4c3c-4afe-98a0-db445684d07b)
@graphite-app graphite-app Bot changed the base branch from graphite-base/3 to main March 18, 2025 20:31
@darshkpatel
Copy link
Copy Markdown
Collaborator Author

@replit/micromanager merge tests - pr exceeds 1k loc threshold due to generated snapshots

@replitmicromanager
Copy link
Copy Markdown

of course @darshkpatel, I will merge it right away

@replitmicromanager replitmicromanager Bot merged commit 525cf88 into main Mar 18, 2025
@darshkpatel darshkpatel deleted the 03-17-feat_tests branch March 19, 2025 01:07
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.

2 participants