-
Notifications
You must be signed in to change notification settings - Fork 245
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: expose props can not access in test case. #2116
Comments
Hi @jason-chang Thank you for the repro. If you're interested in contributing, there are tests in Line 23 in ba53cfb
|
@cexbrayat Thank you for your reply. |
I'm pretty sure it's a test-utils problem. You can start by adding a unit test expose.spec.ts and see if it reproduces the problem. If it's too hard to fix no worries, someone from the team will take a look when we get some time 😉. Thanks! |
@cexbrayat ok👌 |
@cexbrayat @erikkkwu Thanks your tips, I tried to create a pull request to fix & test this bug. #2125 |
Describe the bug
defineExpose
can works fine in the browser, but does not work in the test case.Got error like ⬇️
To Reproduce
To reproduce this problem I created a demo and put it in the
CodeSandbox
.The link is here ⬇️
https://codesandbox.io/p/github/jason-chang/test-utils-bug/main
Components in
src/components/Case.vue
For test cases, see
src/components/tests/case.test.tsx
The browse test code is in
src/App.vue
Expected behavior
You want defineExpose exported projects to be properly accessible in both browser and test case.
Related information:
Additional context
The text was updated successfully, but these errors were encountered: