Validating HTML Entity Transformation in uni-app Compiler Tests
This test suite validates the handling of HTML entities in the uni-app compiler’s transformation process. It ensures proper preservation and processing of special characters and spacing entities during component compilation.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
dcloudio/uni-app
packages/uni-mp-compiler/__tests__/entities.spec.ts
import { assert } from './testUtils'
describe('compiler: transform entities', () => {
test('keep entites', () => {
assert(
`<text><> </text>`,
`<text><> </text>`,
`(_ctx, _cache) => {
const __returned__ = {}
return __returned__
}`,
{
isX: true,
}
)
})
})