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

feat/unit-testing #169

Merged
merged 21 commits into from
Sep 16, 2024
Merged

feat/unit-testing #169

merged 21 commits into from
Sep 16, 2024

Conversation

WesselSmit
Copy link
Member

@WesselSmit WesselSmit commented Sep 9, 2024

Changes

  • 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

Associated issue

Part of #103

How to test

  • verify that the tests in the CI were succesful

Checklist

  • I have performed a self-review of my own code
  • 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
  • I have notified a reviewer

@WesselSmit WesselSmit changed the title Feat/unit testing feat/unit-testing Sep 9, 2024
@WesselSmit WesselSmit marked this pull request as draft September 9, 2024 12:42
Copy link

cloudflare-workers-and-pages bot commented Sep 9, 2024

Deploying head-start with  Cloudflare Pages  Cloudflare Pages

Latest commit: dcc4a2e
Status: ✅  Deploy successful!
Preview URL: https://84ec8210.head-start.pages.dev
Branch Preview URL: https://feat-unit-testing.head-start.pages.dev

View logs

vitest.config.ts Outdated Show resolved Hide resolved
vitest.config.ts Outdated Show resolved Hide resolved
@WesselSmit WesselSmit self-assigned this Sep 16, 2024
@WesselSmit WesselSmit marked this pull request as ready for review September 16, 2024 12:03
@WesselSmit WesselSmit merged commit 088be88 into main Sep 16, 2024
5 checks passed
@WesselSmit WesselSmit deleted the feat/unit-testing branch September 16, 2024 12:04
@jbmoelker jbmoelker mentioned this pull request Sep 18, 2024
5 tasks
luukbrauckmann pushed a commit that referenced this pull request Sep 20, 2024
<!-- 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) -->
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