diff --git a/packages/compiler-core/__tests__/transforms/vOn.spec.ts b/packages/compiler-core/__tests__/transforms/vOn.spec.ts index b1c37e3f74e..27d5027533b 100644 --- a/packages/compiler-core/__tests__/transforms/vOn.spec.ts +++ b/packages/compiler-core/__tests__/transforms/vOn.spec.ts @@ -10,6 +10,7 @@ import { baseParse as parse, transform, } from '../../src' +import { transformFor } from '../../src/transforms/vFor' import { transformOn } from '../../src/transforms/vOn' import { transformElement } from '../../src/transforms/transformElement' import { transformExpression } from '../../src/transforms/transformExpression' @@ -17,7 +18,7 @@ import { transformExpression } from '../../src/transforms/transformExpression' function parseWithVOn(template: string, options: CompilerOptions = {}) { const ast = parse(template, options) transform(ast, { - nodeTransforms: [transformExpression, transformElement], + nodeTransforms: [transformExpression, transformElement, transformFor], directiveTransforms: { on: transformOn, }, @@ -602,6 +603,17 @@ describe('compiler: transform v-on', () => { expect(root.cached).toBe(1) }) + test('unicode identifier should not be cached (v-for)', () => { + const { root } = parseWithVOn( + `