]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
test: update tests
authordaiwei <daiwei521@126.com>
Mon, 30 Dec 2024 09:20:33 +0000 (17:20 +0800)
committerdaiwei <daiwei521@126.com>
Mon, 30 Dec 2024 09:20:33 +0000 (17:20 +0800)
packages/compiler-vapor/__tests__/__snapshots__/compile.spec.ts.snap
packages/compiler-vapor/__tests__/transforms/__snapshots__/transformTemplateRef.spec.ts.snap
packages/compiler-vapor/__tests__/transforms/__snapshots__/vIf.spec.ts.snap
packages/compiler-vapor/__tests__/transforms/__snapshots__/vOnce.spec.ts.snap

index fad91a7952d9c62183ddbdcba5123b1cd8a21764..ec297293c262f6ff057e7c8369f208506cf1b893 100644 (file)
@@ -35,13 +35,13 @@ export function render(_ctx) {
   const _directive_test = _resolveDirective("test")
   const n4 = _createComponentWithFallback(_component_Comp, null, {
     "default": () => {
-      const n0 = _createIf(() => (true)() => {
+      const n0 = _createIf(() => (true) && (() => {
         const n3 = t0()
         const n2 = _createComponentWithFallback(_component_Bar)
         _withDirectives(n2, [[_directive_hello, void 0, void 0, { world: true }]])
         _insert(n2, n3)
         return n3
-      })
+      }))
       return n0
     }
   }, true)
index da863b2407f25ca4eb8275b7e4780c993e0eb92c..9f6c6fea86b50acf3384dd0cd17017b4bed2e036 100644 (file)
@@ -34,11 +34,11 @@ const t0 = _template("<div></div>", true)
 
 export function render(_ctx) {
   const _setTemplateRef = _createTemplateRefSetter()
-  const n0 = _createIf(() => (true)() => {
+  const n0 = _createIf(() => (true) && (() => {
     const n2 = t0()
     _setTemplateRef(n2, "foo")
     return n2
-  })
+  }))
   return n0
 }"
 `;
index a01ec4774d5e778e151e2aa367f12964eaad59f9..df1545d0f5d779c486b54cf3a3ced48895601b47 100644 (file)
@@ -5,11 +5,11 @@ exports[`compiler: v-if > basic v-if 1`] = `
 const t0 = _template("<div></div>", true)
 
 export function render(_ctx) {
-  const n0 = _createIf(() => (_ctx.ok)() => {
+  const n0 = _createIf(() => (_ctx.ok) && (() => {
     const n2 = t0()
     _renderEffect(() => _setText(n2, _ctx.msg))
     return n2
-  })
+  }))
   return n0
 }"
 `;
@@ -25,18 +25,18 @@ const t5 = _template("<input>")
 
 export function render(_ctx) {
   const n13 = t5()
-  const n0 = _createIf(() => (_ctx.ok), () => {
+  const n0 = _createIf(() => (_ctx.ok) ? () => {
     const n2 = t0()
     return n2
-  }, () => _createIf(() => (_ctx.orNot), () => {
+  } : () => (_ctx.orNot) ? () => {
     const n5 = t1()
     const n6 = t2()
     return [n5, n6]
-  }, () => {
+  } : () => {
     const n10 = t3()
     const n11 = t4()
     return [n10, n11]
-  }))
+  })
   _renderEffect(() => _setText(n13, _ctx.text))
   return [n0, n13]
 }"
@@ -47,14 +47,14 @@ exports[`compiler: v-if > dedupe same template 1`] = `
 const t0 = _template("<div>hello</div>")
 
 export function render(_ctx) {
-  const n0 = _createIf(() => (_ctx.ok)() => {
+  const n0 = _createIf(() => (_ctx.ok) && (() => {
     const n2 = t0()
     return n2
-  })
-  const n3 = _createIf(() => (_ctx.ok)() => {
+  }))
+  const n3 = _createIf(() => (_ctx.ok) && (() => {
     const n5 = t0()
     return n5
-  })
+  }))
   return [n0, n3]
 }"
 `;
@@ -66,13 +66,13 @@ const t1 = _template("hello")
 const t2 = _template("<p></p>", true)
 
 export function render(_ctx) {
-  const n0 = _createIf(() => (_ctx.ok)() => {
+  const n0 = _createIf(() => (_ctx.ok) && (() => {
     const n2 = t0()
     const n3 = t1()
     const n4 = t2()
     _renderEffect(() => _setText(n4, _ctx.msg))
     return [n2, n3, n4]
-  })
+  }))
   return n0
 }"
 `;
@@ -83,10 +83,10 @@ const t0 = _template("<div></div>")
 const t1 = _template("<p></p>")
 
 export function render(_ctx) {
-  const n0 = _createIf(() => (_ctx.ok), () => {
+  const n0 = _createIf(() => (_ctx.ok) ? () => {
     const n2 = t0()
     return n2
-  }, () => {
+  } : () => {
     const n4 = t1()
     return n4
   })
@@ -101,16 +101,16 @@ const t1 = _template("<p></p>")
 const t2 = _template("fine")
 
 export function render(_ctx) {
-  const n0 = _createIf(() => (_ctx.ok), () => {
+  const n0 = _createIf(() => (_ctx.ok) ? () => {
     const n2 = t0()
     return n2
-  }, () => _createIf(() => (_ctx.orNot), () => {
+  } : () => (_ctx.orNot) ? () => {
     const n4 = t1()
     return n4
-  }, () => {
+  } : () => {
     const n7 = t2()
     return n7
-  }))
+  })
   return n0
 }"
 `;
@@ -121,10 +121,10 @@ const t0 = _template("<div></div>")
 const t1 = _template("<p></p>")
 
 export function render(_ctx) {
-  const n0 = _createIf(() => (_ctx.ok), () => {
+  const n0 = _createIf(() => (_ctx.ok) ? () => {
     const n2 = t0()
     return n2
-  }, () => _createIf(() => (_ctx.orNot), () => {
+  } : () => (_ctx.orNot) && (() => {
     const n4 = t1()
     return n4
   }))
index 39384169e1038b2b16e93ba7f927da4ea3e6f578..ee25990a5a00308dd39fc0812673e7f0551784d7 100644 (file)
@@ -78,10 +78,10 @@ exports[`compiler: v-once > with v-if 1`] = `
 const t0 = _template("<div></div>", true)
 
 export function render(_ctx) {
-  const n0 = _createIf(() => (_ctx.expr)() => {
+  const n0 = _createIf(() => (_ctx.expr) && (() => {
     const n2 = t0()
     return n2
-  }, null, true)
+  }), true)
   return n0
 }"
 `;
@@ -92,10 +92,10 @@ const t0 = _template("<div></div>")
 const t1 = _template("<p></p>")
 
 export function render(_ctx) {
-  const n0 = _createIf(() => (_ctx.expr), () => {
+  const n0 = _createIf(() => (_ctx.expr) ? () => {
     const n2 = t0()
     return n2
-  }, () => {
+  } : () => {
     const n4 = t1()
     return n4
   }, true)