|
|
@@ -302,6 +302,66 @@ export function render(_ctx) {
|
|
|
}"
|
|
|
`;
|
|
|
|
|
|
+exports[`cache multiple access > should not cache Date.now() call expressions 1`] = `
|
|
|
+"import { setProp as _setProp, renderEffect as _renderEffect, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n0 = t0()
|
|
|
+ const n1 = t0()
|
|
|
+ _renderEffect(() => {
|
|
|
+ _setProp(n0, "id", Date.now())
|
|
|
+ _setProp(n1, "id", Date.now())
|
|
|
+ })
|
|
|
+ return [n0, n1]
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`cache multiple access > should not cache globally allowed identifier as variable 1`] = `
|
|
|
+"import { setProp as _setProp, renderEffect as _renderEffect, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n0 = t0()
|
|
|
+ const n1 = t0()
|
|
|
+ _renderEffect(() => {
|
|
|
+ _setProp(n0, "id", String(_ctx.foo))
|
|
|
+ _setProp(n1, "id", String(_ctx.bar))
|
|
|
+ })
|
|
|
+ return [n0, n1]
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`cache multiple access > should not cache globally allowed identifier call expressions 1`] = `
|
|
|
+"import { setProp as _setProp, renderEffect as _renderEffect, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n0 = t0()
|
|
|
+ const n1 = t0()
|
|
|
+ _renderEffect(() => {
|
|
|
+ _setProp(n0, "id", Math.random())
|
|
|
+ _setProp(n1, "id", Math.random())
|
|
|
+ })
|
|
|
+ return [n0, n1]
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`cache multiple access > should not cache member expression containing globally allowed call 1`] = `
|
|
|
+"import { setProp as _setProp, renderEffect as _renderEffect, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n0 = t0()
|
|
|
+ const n1 = t0()
|
|
|
+ _renderEffect(() => {
|
|
|
+ _setProp(n0, "id", _ctx.obj[Math.random()])
|
|
|
+ _setProp(n1, "id", _ctx.obj[Math.random()])
|
|
|
+ })
|
|
|
+ return [n0, n1]
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
exports[`cache multiple access > should not cache method call with different arguments 1`] = `
|
|
|
"import { setProp as _setProp, renderEffect as _renderEffect, template as _template } from 'vue';
|
|
|
const t0 = _template("<div>")
|
|
|
@@ -318,6 +378,21 @@ export function render(_ctx) {
|
|
|
}"
|
|
|
`;
|
|
|
|
|
|
+exports[`cache multiple access > should not cache mixed expression with globally allowed call 1`] = `
|
|
|
+"import { setProp as _setProp, renderEffect as _renderEffect, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n0 = t0()
|
|
|
+ const n1 = t0()
|
|
|
+ _renderEffect(() => {
|
|
|
+ _setProp(n0, "id", Math.random() + _ctx.foo)
|
|
|
+ _setProp(n1, "id", Math.random() + _ctx.foo)
|
|
|
+ })
|
|
|
+ return [n0, n1]
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
exports[`cache multiple access > variable name substring edge cases 1`] = `
|
|
|
"import { setProp as _setProp, renderEffect as _renderEffect, template as _template } from 'vue';
|
|
|
const t0 = _template("<div>", true)
|