Skip to content

Commit 42c6d19

Browse files
committed
test(mp-weixin): 补充 store-home 组件测试用例
1 parent 28e9a91 commit 42c6d19

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/uni-mp-weixin/__tests__/component.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,22 @@ describe('mp-weixin: transform component', () => {
221221
`<movable-area><block wx:if="{{r0}}"><movable-view direction="{{a}}">drag me</movable-view></block></movable-area>`,
222222
`(_ctx, _cache) => {
223223
return { a: _ctx.direction }
224+
}`
225+
)
226+
})
227+
test('lazy element: store-home', () => {
228+
assert(
229+
`<store-home appid="appid"/>`,
230+
`<store-home appid="appid"/>`,
231+
`(_ctx, _cache) => {
232+
return {}
233+
}`
234+
)
235+
assert(
236+
`<store-home :appid="appid"/>`,
237+
`<block wx:if="{{r0}}"><store-home appid="{{a}}"/></block>`,
238+
`(_ctx, _cache) => {
239+
return { a: _ctx.appid }
224240
}`
225241
)
226242
})

0 commit comments

Comments
 (0)