Skip to content

Commit 0514e6b

Browse files
committed
test: update test
1 parent 5015687 commit 0514e6b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

packages/runtime-core/__tests__/helpers/renderList.spec.ts

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { reactive, ref, shallowReactive } from '../../src/index'
1+
import { isReactive, reactive, shallowReactive } from '../../src/index'
22
import { renderList } from '../../src/helpers/renderList'
33

44
describe('renderList', () => {
@@ -59,15 +59,12 @@ describe('renderList', () => {
5959
})
6060

6161
it('should render items in a reactive array correctly', () => {
62-
const reactiveArray = reactive([{ foo: ref('foo') }])
63-
const shallowReactiveArray = shallowReactive([{ foo: ref('foo') }])
62+
const reactiveArray = reactive([{ foo: 1 }])
63+
expect(renderList(reactiveArray, item => isReactive(item))).toEqual([true])
6464

65-
expect(renderList(reactiveArray, item => `${typeof item.foo}`)).toEqual([
66-
'string',
65+
const shallowReactiveArray = shallowReactive([{ foo: 1 }])
66+
expect(renderList(shallowReactiveArray, item => isReactive(item))).toEqual([
67+
false,
6768
])
68-
69-
expect(
70-
renderList(shallowReactiveArray, item => `${typeof item.foo}`),
71-
).toEqual(['object'])
7269
})
7370
})

0 commit comments

Comments
 (0)