Testing v-show Directive Compilation in dcloudio/uni-app Android Templates
This test suite examines the v-show directive implementation in the uni-app UTS Android transformation layer. It verifies the correct compilation and transformation of v-show directives in view templates to their corresponding runtime implementations.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
dcloudio/uni-app
packages/uni-app-uts/__tests__/android/transforms/vShow.spec.ts
import { assert } from '../testUtils'
describe('compiler:v-show', () => {
test('template v-show', () => {
assert(
`<view v-show="a"></view>`,
`withDirectives(createElementVNode("view", null, null, 512 /* NEED_PATCH */), [
[vShow, _ctx.a]
])`
)
})
})