[addon-test] Expose the assert
API from Vitest
#30052
adriantrunzo
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
The
assert
API is very handy in tests, for example when asserting that a variable is defined and having TS be able to use the assertion result.Describe the solution you'd like
I'd like to be able to use
import { assert } from "@storybook/test"
;Describe alternatives you've considered
I can define my own
invariant
function like:But this functionality is already built into Vitest so it would be great to have support for
assert
out of the box.Are you able to assist to bring the feature to reality?
yes, I can
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions