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(logging): replace jest with vitest #5765

Merged
merged 4 commits into from
Dec 18, 2024
Merged

Conversation

eventualbuddha
Copy link
Collaborator

Closes #5725

In addition to changing the tests for libs/logging itself, changes mockLogger et al to require a mock function. Some of the istanbul ignore directives no longer work because esbuild at the version vitest uses doesn't support preserving comments preceding a case or default (see this).

Copy link
Collaborator

@jonahkagan jonahkagan left a comment

Choose a reason for hiding this comment

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

Bummer about the esbuild issue. Do you foresee that being something we can fix in the future?

"test:ci": "pnpm build && pnpm test:coverage --reporters=default --reporters=jest-junit --maxWorkers=6 && pnpm build:generate-typescript-types --check && pnpm build:generate-rust-types --check",
"test:watch": "TZ=UTC vitest",
"test:coverage": "TZ=UTC vitest --coverage",
"test:ci": "pnpm build && TZ=UTC vitest run --coverage && pnpm build:generate-typescript-types --check && pnpm build:generate-rust-types --check",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe a good time to switch to America/Anchorage timezone?

@eventualbuddha
Copy link
Collaborator Author

Bummer about the esbuild issue. Do you foresee that being something we can fix in the future?

I'm guessing that eventually vitest will either use a new enough version of esbuild or switch to oxc (where hopefully they'll have a solution to this).

@eventualbuddha eventualbuddha merged commit 1a760e4 into vitest Dec 18, 2024
62 checks passed
@eventualbuddha eventualbuddha deleted the 5725-libslogging branch December 18, 2024 01:05
eventualbuddha added a commit that referenced this pull request Dec 19, 2024
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