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(chore): add test execution #38

Merged
merged 3 commits into from
Sep 22, 2023

Conversation

mnlfischer
Copy link
Contributor

@mnlfischer mnlfischer commented Sep 21, 2023

Description

Adding Vitest and a new action for automated testing. This PR only adds one component test for testing reasons.

Checklist

  • Change increases quality
  • Change is validated by tests
  • Change is readable and easy to understand
  • Documentation is updated
  • Security impact has been considered
  • Changes validated in runtime

@mnlfischer mnlfischer self-assigned this Sep 21, 2023
describe("Alert", () => {
it("renders an alert with a title and children", () => {
// ARRANGE
const { getByRole } = render(
Copy link
Contributor

Choose a reason for hiding this comment

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

Using screen.getByRole is recommended by the creators, although it doesn't make a substantial difference 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will change it to match the docs! Thanks for bringing that up. I run through different examples to get the additional "toBeInTheDocument()" functions to work and I guess I messed it up.

steps:
- uses: actions/checkout@v3
with:
persist-credentials: false # <--- this
Copy link
Contributor

Choose a reason for hiding this comment

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

What does that comment mean 🤔 ?

Copy link
Contributor Author

@mnlfischer mnlfischer Sep 22, 2023

Choose a reason for hiding this comment

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

tbh I copied it from all other actions. I will remove it for all of them 👍🏻

Copy link
Contributor

@pallendes pallendes left a comment

Choose a reason for hiding this comment

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

lgtm 🎉

@mnlfischer mnlfischer merged commit 042bdb1 into main Sep 22, 2023
3 checks passed
@mnlfischer mnlfischer deleted the pla-479-hailstorm-setup-test-execution-for-repo branch September 22, 2023 10:03
@abusix-bot
Copy link
Collaborator

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants