-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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(reactivity): improve typing #10155
base: main
Are you sure you want to change the base?
Conversation
Size ReportBundles
Usages
|
@@ -241,7 +241,6 @@ describe('reactivity/ref', () => { | |||
expect(isRef(computed(() => 1))).toBe(true) | |||
|
|||
expect(isRef(0)).toBe(false) | |||
expect(isRef(1)).toBe(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be removed. Testing isRef
with a truthy primitive value seems like a valid test case.
@@ -339,7 +331,6 @@ describe('reactivity/computed', () => { | |||
_msg = msg.value | |||
}) | |||
|
|||
items.value = [1, 2, 3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This extra assignment is part of what is being tested in this edge case. The test may pass either way, but it needs this line to test the right thing.
This PR makes the following changes to the
reactivity
test code:any
type