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

🐛 Bug: Vitest@0.30.0 causes crash after tests #204

Closed
3 tasks done
JoshuaKGoldberg opened this issue May 1, 2023 · 0 comments · Fixed by #205
Closed
3 tasks done

🐛 Bug: Vitest@0.30.0 causes crash after tests #204

JoshuaKGoldberg opened this issue May 1, 2023 · 0 comments · Fixed by #205
Assignees

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

console-fail-test should support the latest versions of Vitest, which is 0.30.X right now.

Actual

From JoshuaKGoldberg/create-typescript-app#373 -> https://github.com/JoshuaKGoldberg/template-typescript-node-package/actions/runs/4853883547/jobs/8650573662?pr=373

 FAIL  src/greet.test.ts > greet > logs a specified number of times when times is provided
TypeError: spy.restore is not a function
 ❯ node_modules/.pnpm/console-fail-test@0.2.0/node_modules/console-fail-test/src/cft.js:32:17
 ❯ node_modules/.pnpm/console-fail-test@0.2.0/node_modules/console-fail-test/src/environments/vitest.js:12:79

Additional Info

The culprit is vitest-dev/vitest#3069. Turns out spy.calls and spy.restore were undocumented meant-to-be-private properties.

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 a pull request may close this issue.

1 participant