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

test(commons): migrate to vitest #3060

Merged
merged 7 commits into from
Sep 16, 2024
Merged

test(commons): migrate to vitest #3060

merged 7 commits into from
Sep 16, 2024

Conversation

dreamorosi
Copy link
Contributor

Summary

Changes

Please provide a summary of what's being changed

This PR switches the test runner of the commons package from Jest to Vitest, continuing the migration effort for the project.

The PR is relatively small and focuses primarily in: 1/ changing the imports to vitest specific ones, 2/ standardizing the test headers, and 3/ updating the commands & configs to suit the new runner.

The only notable change of the PR is that Vitest supports type testing, which opens up new possibilities for our tests. Concretely this PR introduces the first "unit" test for types around the LambdaInterface type. We'll be experimenting with more tests of this kind in the future.

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: closes #3059


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@dreamorosi dreamorosi self-assigned this Sep 13, 2024
@dreamorosi dreamorosi requested review from a team as code owners September 13, 2024 11:05
@boring-cyborg boring-cyborg bot added automation This item relates to automation dependencies Changes that touch dependencies, e.g. Dependabot, etc. internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) tests PRs that add or change tests labels Sep 13, 2024
@pull-request-size pull-request-size bot added the size/L PRs between 100-499 LOC label Sep 13, 2024
@dreamorosi dreamorosi changed the title Test/commons vitest test(commons): migrate to vitest Sep 13, 2024
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hi @dreamorosi! I left some small comments, but it doesn't affect this migration if you don't accept it.

Approving.

packages/commons/package.json Show resolved Hide resolved
packages/commons/tests/unit/LRUCache.test.ts Show resolved Hide resolved
packages/commons/tests/unit/LRUCache.test.ts Outdated Show resolved Hide resolved
packages/commons/tests/unit/Utility.test.ts Show resolved Hide resolved
Copy link

@dreamorosi dreamorosi merged commit e7a8c8c into main Sep 16, 2024
14 checks passed
@dreamorosi dreamorosi deleted the test/commons_vitest branch September 16, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation This item relates to automation dependencies Changes that touch dependencies, e.g. Dependabot, etc. internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) size/L PRs between 100-499 LOC tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: migrate test runner to vitest for commons package
2 participants