Skip to content

Commit c81ded2

Browse files
committed
test: update swc-plugin-component snapshots and fix SSR fixture expected failures
Update 148 swc-expected.js snapshots to match SWC plugin output format (double quotes, compact indentation). Add swc-expected.* to .prettierignore since these are auto-generated fixture outputs. Remove render-undefined and render-bad-value from ssr-compiler expectedFailures since SSRv2 now handles them correctly, and add ssrFiles config to separate SSRv2 output files from SSRv1 engine-server snapshots. Made-with: Cursor
1 parent 0a64fab commit c81ded2

File tree

100 files changed

+1379
-1791
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1379
-1791
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ __benchmarks_results__/
1616
# Auto-generated fixture outputs
1717
**/fixtures/**/expected.*
1818
**/fixtures/**/error.*
19+
**/fixtures/**/swc-expected.*
1920
packages/@lwc/template-compiler/src/__tests__/fixtures/**/ast.json
2021
packages/@lwc/template-compiler/src/__tests__/fixtures/**/metadata.json
2122

Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
1-
import tmpl from './test.html';
1+
import tmpl from "./test.html";
22
import { LightningElement, registerDecorators, registerComponent } from 'lwc';
3-
const __lwc_component_class_internal = registerComponent(
4-
registerDecorators(
5-
class Test extends LightningElement {
6-
set first(value) {}
7-
get first() {}
8-
get second() {
9-
return this.s;
10-
}
11-
set second(value) {
12-
this.s = value;
13-
}
14-
/*LWC compiler vX.X.X*/
3+
const __lwc_component_class_internal = registerComponent(registerDecorators(class Test extends LightningElement {
4+
set first(value) {}
5+
get first() {}
6+
get second() {
7+
return this.s;
8+
}
9+
set second(value) {
10+
this.s = value;
11+
}
12+
/*LWC compiler vX.X.X*/}, {
13+
publicProps: {
14+
first: {
15+
config: 3
1516
},
16-
{
17-
publicProps: {
18-
first: {
19-
config: 3,
20-
},
21-
second: {
22-
config: 3,
23-
},
24-
},
17+
second: {
18+
config: 3
2519
}
26-
),
27-
{
28-
tmpl: tmpl,
29-
sel: 'lwc-test',
30-
apiVersion: 9999999,
3120
}
32-
);
21+
}), {
22+
tmpl: tmpl,
23+
sel: "lwc-test",
24+
apiVersion: 9999999
25+
});
3326
export default __lwc_component_class_internal;
3427
const Test = __lwc_component_class_internal;
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1-
import tmpl from './test.html';
2-
import { LightningElement, registerDecorators, registerComponent } from 'lwc';
3-
const __lwc_component_class_internal = registerComponent(
4-
registerDecorators(
5-
class Test extends LightningElement {
6-
/*LWC compiler vX.X.X*/
7-
},
8-
{
9-
publicProps: {
10-
data: {
11-
config: 0,
12-
},
13-
},
1+
import tmpl from "./test.html";
2+
import { LightningElement, registerDecorators, registerComponent } from "lwc";
3+
const __lwc_component_class_internal = registerComponent(registerDecorators(class Test extends LightningElement {
4+
/*LWC compiler vX.X.X*/}, {
5+
publicProps: {
6+
data: {
7+
config: 0
148
}
15-
),
16-
{
17-
tmpl: tmpl,
18-
sel: 'lwc-test',
19-
apiVersion: 9999999,
209
}
21-
);
10+
}), {
11+
tmpl: tmpl,
12+
sel: "lwc-test",
13+
apiVersion: 9999999
14+
});
2215
export default __lwc_component_class_internal;
2316
const Test = __lwc_component_class_internal;
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1-
import tmpl from './test.html';
2-
import { LightningElement, registerDecorators, registerComponent } from 'lwc';
3-
const __lwc_component_class_internal = registerComponent(
4-
registerDecorators(
5-
class Test extends LightningElement {
6-
/*LWC compiler vX.X.X*/
7-
},
8-
{
9-
publicProps: {
10-
ariaDescribedBy: {
11-
config: 0,
12-
},
13-
},
1+
import tmpl from "./test.html";
2+
import { LightningElement, registerDecorators, registerComponent } from "lwc";
3+
const __lwc_component_class_internal = registerComponent(registerDecorators(class Test extends LightningElement {
4+
/*LWC compiler vX.X.X*/}, {
5+
publicProps: {
6+
ariaDescribedBy: {
7+
config: 0
148
}
15-
),
16-
{
17-
tmpl: tmpl,
18-
sel: 'lwc-test',
19-
apiVersion: 9999999,
209
}
21-
);
10+
}), {
11+
tmpl: tmpl,
12+
sel: "lwc-test",
13+
apiVersion: 9999999
14+
});
2215
export default __lwc_component_class_internal;
2316
const Test = __lwc_component_class_internal;
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
1-
import tmpl from './test.html';
2-
import { LightningElement, registerDecorators, registerComponent } from 'lwc';
3-
const __lwc_component_class_internal = registerComponent(
4-
registerDecorators(
5-
class Test extends LightningElement {
6-
get first() {
7-
return null;
8-
}
9-
get second() {
10-
return this.s;
11-
}
12-
set second(value) {
13-
this.s = value;
14-
}
15-
/*LWC compiler vX.X.X*/
1+
import tmpl from "./test.html";
2+
import { LightningElement, registerDecorators, registerComponent } from "lwc";
3+
const __lwc_component_class_internal = registerComponent(registerDecorators(class Test extends LightningElement {
4+
get first() {
5+
return null;
6+
}
7+
get second() {
8+
return this.s;
9+
}
10+
set second(value) {
11+
this.s = value;
12+
}
13+
/*LWC compiler vX.X.X*/}, {
14+
publicProps: {
15+
first: {
16+
config: 1
1617
},
17-
{
18-
publicProps: {
19-
first: {
20-
config: 1,
21-
},
22-
second: {
23-
config: 3,
24-
},
25-
},
18+
second: {
19+
config: 3
2620
}
27-
),
28-
{
29-
tmpl: tmpl,
30-
sel: 'lwc-test',
31-
apiVersion: 9999999,
3221
}
33-
);
22+
}), {
23+
tmpl: tmpl,
24+
sel: "lwc-test",
25+
apiVersion: 9999999
26+
});
3427
export default __lwc_component_class_internal;
3528
const Test = __lwc_component_class_internal;
Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,41 @@
1-
import tmpl from './test.html';
2-
import { LightningElement, registerDecorators, registerComponent } from 'lwc';
3-
const __lwc_component_class_internal = registerComponent(
4-
registerDecorators(
5-
class Text extends LightningElement {
6-
get aloneGet() {}
7-
get myget() {}
8-
set myget(x) {
9-
return 1;
10-
}
11-
m1() {}
12-
m2() {}
13-
static {
14-
this.ctor = 'ctor';
15-
}
16-
static get ctorGet() {
17-
return 1;
18-
}
19-
/*LWC compiler vX.X.X*/
1+
import tmpl from "./test.html";
2+
import { LightningElement, registerDecorators, registerComponent } from "lwc";
3+
const __lwc_component_class_internal = registerComponent(registerDecorators(class Text extends LightningElement {
4+
get aloneGet() {}
5+
get myget() {}
6+
set myget(x) {
7+
return 1;
8+
}
9+
m1() {}
10+
m2() {}
11+
static{
12+
this.ctor = "ctor";
13+
}
14+
static get ctorGet() {
15+
return 1;
16+
}
17+
/*LWC compiler vX.X.X*/}, {
18+
publicProps: {
19+
publicProp: {
20+
config: 0
2021
},
21-
{
22-
publicProps: {
23-
publicProp: {
24-
config: 0,
25-
},
26-
aloneGet: {
27-
config: 1,
28-
},
29-
myget: {
30-
config: 3,
31-
},
32-
},
33-
publicMethods: ['m1'],
34-
fields: ['privateProp'],
22+
aloneGet: {
23+
config: 1
24+
},
25+
myget: {
26+
config: 3
3527
}
36-
),
37-
{
38-
tmpl: tmpl,
39-
sel: 'lwc-test',
40-
apiVersion: 9999999,
41-
}
42-
);
28+
},
29+
publicMethods: [
30+
"m1"
31+
],
32+
fields: [
33+
"privateProp"
34+
]
35+
}), {
36+
tmpl: tmpl,
37+
sel: "lwc-test",
38+
apiVersion: 9999999
39+
});
4340
export default __lwc_component_class_internal;
4441
const Text = __lwc_component_class_internal;
Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
1-
import tmpl from './test.html';
2-
import { LightningElement, registerDecorators, registerComponent } from 'lwc';
3-
const __lwc_component_class_internal = registerComponent(
4-
registerDecorators(
5-
class Outer extends LightningElement {
6-
constructor(...args) {
7-
(super(...args),
8-
(this.a = registerDecorators(class extends LightningElement {}, {
9-
publicProps: {
10-
innerA: {
11-
config: 0,
12-
},
13-
},
14-
})));
15-
}
16-
/*LWC compiler vX.X.X*/
17-
},
18-
{
1+
import tmpl from "./test.html";
2+
import { LightningElement, registerDecorators, registerComponent } from "lwc";
3+
const __lwc_component_class_internal = registerComponent(registerDecorators(class Outer extends LightningElement {
4+
constructor(...args){
5+
super(...args), this.a = registerDecorators(class extends LightningElement {
6+
}, {
197
publicProps: {
20-
outer: {
21-
config: 0,
22-
},
23-
},
24-
fields: ['a'],
25-
}
26-
),
27-
{
28-
tmpl: tmpl,
29-
sel: 'lwc-test',
30-
apiVersion: 9999999,
8+
innerA: {
9+
config: 0
10+
}
11+
}
12+
});
3113
}
32-
);
14+
/*LWC compiler vX.X.X*/}, {
15+
publicProps: {
16+
outer: {
17+
config: 0
18+
}
19+
},
20+
fields: [
21+
"a"
22+
]
23+
}), {
24+
tmpl: tmpl,
25+
sel: "lwc-test",
26+
apiVersion: 9999999
27+
});
3328
export default __lwc_component_class_internal;
3429
const Outer = __lwc_component_class_internal;

0 commit comments

Comments
 (0)