Skip to content

Commit 0ac2500

Browse files
committed
add unref test
1 parent 0c4cbe0 commit 0ac2500

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/apis/ref.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
// isReactive,
1010
computed,
1111
effect,
12+
unref,
1213
} from '../../src';
1314
// import { shallowRef, unref, customRef } from '../src/ref'
1415

@@ -155,10 +156,10 @@ describe('reactivity/ref', () => {
155156
expect(objRef.value[customSymbol]).toStrictEqual(obj[customSymbol]);
156157
});
157158

158-
// test('unref', () => {
159-
// expect(unref(1)).toBe(1);
160-
// expect(unref(ref(1))).toBe(1);
161-
// });
159+
test('unref', () => {
160+
expect(unref(1)).toBe(1);
161+
expect(unref(ref(1))).toBe(1);
162+
});
162163

163164
// test('shallowRef', () => {
164165
// const sref = shallowRef({ a: 1 });

0 commit comments

Comments
 (0)