We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9547c2b commit 014acc1Copy full SHA for 014acc1
packages/reactivity/__tests__/ref.spec.ts
@@ -33,6 +33,17 @@ describe('reactivity/ref', () => {
33
expect(dummy).toBe(2)
34
})
35
36
+ it('should work without initial value', () => {
37
+ const a = ref()
38
+ let dummy
39
+ effect(() => {
40
+ dummy = a.value
41
+ })
42
+ expect(dummy).toBe(undefined)
43
+ a.value = 2
44
+ expect(dummy).toBe(2)
45
46
+
47
it('should work like a normal property when nested in a reactive object', () => {
48
const a = ref(1)
49
const obj = reactive({
0 commit comments