Skip to content

Commit 141134a

Browse files
committed
test(mp-alipay): 补充测试用例
1 parent daa28d2 commit 141134a

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,32 @@ describe('mp-alipay: transform component x', () => {
146146
}
147147
)
148148

149+
assert(
150+
`<canvas id="myCanvas"/>`,
151+
`<canvas id="myCanvas" style="{{'--status-bar-height:' + b}}" type="2d" change:eS="{{uV.sS}}" eS=\"{{$eS[a]}}\" change:eA="{{uV.sA}}" eA=\"{{$eA[a]}}\"/>`,
152+
`(_ctx, _cache) => { "raw js"
153+
const __returned__ = { a: _sei('myCanvas', 'canvas'), b: \`\${_ctx.u_s_b_h}px\` }
154+
return __returned__
155+
}`,
156+
{
157+
isX: true,
158+
nodeTransforms: [transformMPBuiltInTag],
159+
}
160+
)
161+
162+
assert(
163+
`<canvas canvas-id="myCanvas"/>`,
164+
`<canvas id="myCanvas" style="{{'--status-bar-height:' + b}}" type="2d" change:eS="{{uV.sS}}" eS=\"{{$eS[a]}}\" change:eA="{{uV.sA}}" eA=\"{{$eA[a]}}\"/>`,
165+
`(_ctx, _cache) => { "raw js"
166+
const __returned__ = { a: _sei('myCanvas', 'canvas'), b: \`\${_ctx.u_s_b_h}px\` }
167+
return __returned__
168+
}`,
169+
{
170+
isX: true,
171+
nodeTransforms: [transformMPBuiltInTag],
172+
}
173+
)
174+
149175
assert(
150176
`<canvas type="2d"/>`,
151177
`<canvas type="2d" style="{{'--status-bar-height:' + a}}"/>`,

0 commit comments

Comments
 (0)