Skip to content

Commit aaffccf

Browse files
fix: additional testing around ssr specific codepaths
1 parent 3b9d43a commit aaffccf

File tree

28 files changed

+321
-220
lines changed

28 files changed

+321
-220
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<fixture-test>
2+
<template shadowrootmode="open">
3+
<div class="foobar">
4+
</div>
5+
</template>
6+
</fixture-test>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"entry": "x/for-each-block",
3+
"experimentalComplexExpressions": true,
4+
"ssrFiles": {
5+
"expected": "expected-ssr.html",
6+
"error": "error-ssr.txt"
7+
}
8+
}

packages/@lwc/engine-server/src/__tests__/fixtures/for-each-block/complex/error-ssr.txt

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LWC1034: Ambiguous attribute value for:each="{list()}". If you want to make it a valid identifier you should remove the surrounding quotes for:each={list()}. If you want to make it a string you should escape it for:each="\{list()}".
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<fixture-test>
2+
<template shadowrootmode="open">
3+
<ul>
4+
<li>
5+
0 - paris
6+
</li>
7+
<li>
8+
1 - london
9+
</li>
10+
<li>
11+
2 - tokyo
12+
</li>
13+
</ul>
14+
</template>
15+
</fixture-test>

packages/@lwc/engine-server/src/__tests__/fixtures/for-each-block/complex/expected.html

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<ul>
3+
<template for:each="{list()}" for:item="item" for:index="index">
4+
<li key={item}>{index} - {item}</li>
5+
</template>
6+
</ul>
7+
</template>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { LightningElement } from 'lwc';
2+
3+
export default class Component extends LightningElement {
4+
list() {
5+
return ['paris', 'london', 'tokyo'];
6+
}
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"entry": "x/component",
3+
"experimentalComplexExpressions": true,
4+
"ssrFiles": {
5+
"expected": "expected-ssr.html",
6+
"error": "error-ssr.txt"
7+
}
8+
}

packages/@lwc/engine-server/src/__tests__/fixtures/lwc-if-else-complex/error-ssr.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)