-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: component testing #177
Conversation
Deploying head-start with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, I can imagine this took quite some effort!
I do have some remarks regarding how to structure tests and how to handle the data going into the tests. I also noticed some changes in the component to sidestep some issues with the renderer. I think it might be wise to skip those components instead of adding behavior that might have unintended consequences.
And a final tip that I did not mention in the comments: take a look at your commit history and see if you can clean that up a bit. You have three subsequent commits called 'Refactor'. Are you refactoring things you did in this branch earlier? If so, try to squash those with the changes your made earlier, they are no longer relevant. If not, try to elaborate a bit on what you are refactoring and why. Make commits atomic and only about the issue at hand.
7ba8552
to
10edeef
Compare
# Changes - Adds sitelinks search box structured data # Associated issue Resolves #109 # How to test 1. Copy preview link 2. Go to https://search.google.com/test/rich-results 3. Paste preview link in field # Checklist - [x] I have performed a self-review of my own code - [x] I have made sure that my PR is easy to review (not too big, includes comments) - [x] I have made updated relevant documentation files (in project README, docs/, etc) - [x] I have added a decision log entry if the change affects the architecture or changes a significant technology - [x] I have notified a reviewer <!-- Please strike through and check off all items that do not apply (rather than removing them) --> --------- Co-authored-by: Jasper Moelker <jasper@voorhoede.nl>
# Changes - Trims trailing whitespace from anchor (text) content. This prevents an underline from extending beyond the word boundary. # How to test 1. Open preview link 2. Scroll to the hyperlinks example. 3. See that their link does not extend to the space after the last word. 4. Compare that with the current https://head-start.pages.dev/en/ # Checklist - [x] I have performed a self-review of my own code - [x] I have made sure that my PR is easy to review (not too big, includes comments) - ~~I have made updated relevant documentation files (in project README, docs/, etc)~~ - ~~I have added a decision log entry if the change affects the architecture or changes a significant technology~~ - [x] I have notified a reviewer <!-- Please strike through and check off all items that do not apply (rather than removing them) --> --------- Co-authored-by: Jasper Moelker <jasper@voorhoede.nl>
# Changes - Adds TS plugin for .astro files, so it won't be highlighted as an error. # Associated issue Resolves #175 # How to test <!-- example: 1. Open a non VSCode editor (best is to test in Zed) 2. Checkout branch 3. Run `npm ci` 4. Open a .ts file which imports an .astro file. For example src/components/Tabs/index.ts 5. Imports should not be highlighted as error. --> # Checklist - [x] I have performed a self-review of my own code - [x] I have made sure that my PR is easy to review (not too big, includes comments) - [x] I have made updated relevant documentation files (in project README, docs/, etc) - [x] I have added a decision log entry if the change affects the architecture or changes a significant technology - [x] I have notified a reviewer <!-- Please strike through and check off all items that do not apply (rather than removing them) --> Co-authored-by: Jasper Moelker <jasper@voorhoede.nl>
<!-- example: - Fixes wrong color in button - Adds a new page --> - adds `test` and `unit-test` scripts - adds unit tests for `i18n` lib function - adds a `vitest.config.ts` so we can configure the testing suite - adds new deps needed for testing - adds `unit-tests` step to github action CI so we test each commit to the repo from now on - uses the `github actions reporter` to enable formatting and highlighting of testing output in the CI pipeline - adds documentation for testing setup - fixes the following issues in the i18n lib function: - interpolation did not work in the `t` function - params and language props were not supported in `t` function Part of #103 - verify that the tests in the CI were succesful - [x] I have performed a self-review of my own code - [x] I have made sure that my PR is easy to review (not too big, includes comments) - [x] I have made updated relevant documentation files (in project README, docs/, etc) - [x] I have added a decision log entry if the change affects the architecture or changes a significant technology - [x] I have notified a reviewer <!-- Please strike through and check off all items that do not apply (rather than removing them) -->
10edeef
to
f9c6d2f
Compare
4f04c04
to
8b3d04e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! After removing the inactive code and console.log, I think it's time to merge it and move any enhancements to the tests to the issues.
Changes
Associated issue
None
How to test
npm ci
npm run test
Checklist