-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(ssr): add more tests for superclasses (#4912)
- Loading branch information
1 parent
ca4fa26
commit c95f6ae
Showing
40 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
5 changes: 5 additions & 0 deletions
5
...wc/engine-server/src/__tests__/fixtures/render-with-unused-default-template/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<x-component> | ||
<template shadowrootmode="open"> | ||
Use me!!! | ||
</template> | ||
</x-component> |
3 changes: 3 additions & 0 deletions
3
...es/@lwc/engine-server/src/__tests__/fixtures/render-with-unused-default-template/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const tagName = 'x-component'; | ||
export { default } from 'x/component'; | ||
export * from 'x/component'; |
3 changes: 3 additions & 0 deletions
3
...__tests__/fixtures/render-with-unused-default-template/modules/x/component/component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
Don't use me!!! | ||
</template> |
10 changes: 10 additions & 0 deletions
10
...c/__tests__/fixtures/render-with-unused-default-template/modules/x/component/component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { LightningElement } from 'lwc' | ||
import tmpl from './tmpl.html' | ||
|
||
export default class extends LightningElement { | ||
hello = 'foobar' | ||
|
||
render () { | ||
return tmpl | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
.../src/__tests__/fixtures/render-with-unused-default-template/modules/x/component/tmpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
Use me!!! | ||
</template> |
Empty file.
7 changes: 7 additions & 0 deletions
7
...c/engine-server/src/__tests__/fixtures/superclass/no-template-in-superclass/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<x-component> | ||
<template shadowrootmode="open"> | ||
<div> | ||
hello world | ||
</div> | ||
</template> | ||
</x-component> |
3 changes: 3 additions & 0 deletions
3
...s/@lwc/engine-server/src/__tests__/fixtures/superclass/no-template-in-superclass/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const tagName = 'x-component'; | ||
export { default } from 'x/component'; | ||
export * from 'x/component'; |
3 changes: 3 additions & 0 deletions
3
..._tests__/fixtures/superclass/no-template-in-superclass/modules/x/component/component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>{hello} {world}</div> | ||
</template> |
5 changes: 5 additions & 0 deletions
5
.../__tests__/fixtures/superclass/no-template-in-superclass/modules/x/component/component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import FancyElement from 'x/fancyElement' | ||
|
||
export default class extends FancyElement { | ||
world = 'world' | ||
} |
5 changes: 5 additions & 0 deletions
5
...ts__/fixtures/superclass/no-template-in-superclass/modules/x/fancyElement/fancyElement.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class extends LightningElement { | ||
hello = 'hello' | ||
} |
Empty file.
7 changes: 7 additions & 0 deletions
7
.../__tests__/fixtures/superclass/render-in-superclass/no-template-in-subclass/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<x-component> | ||
<template shadowrootmode="open"> | ||
<div> | ||
foobar | ||
</div> | ||
</template> | ||
</x-component> |
3 changes: 3 additions & 0 deletions
3
...r/src/__tests__/fixtures/superclass/render-in-superclass/no-template-in-subclass/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const tagName = 'x-component'; | ||
export { default } from 'x/component'; | ||
export * from 'x/component'; |
5 changes: 5 additions & 0 deletions
5
.../superclass/render-in-superclass/no-template-in-subclass/modules/x/component/component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import FancyElement from 'x/fancyElement' | ||
|
||
export default class extends FancyElement { | ||
hello = 'foobar' | ||
} |
8 changes: 8 additions & 0 deletions
8
...class/render-in-superclass/no-template-in-subclass/modules/x/fancyElement/fancyElement.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { LightningElement } from 'lwc'; | ||
import tmpl from './tmpl.html' | ||
|
||
export default class extends LightningElement { | ||
render() { | ||
return tmpl | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
.../superclass/render-in-superclass/no-template-in-subclass/modules/x/fancyElement/tmpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>{hello}</div> | ||
</template> |
Empty file.
5 changes: 5 additions & 0 deletions
5
...r/src/__tests__/fixtures/superclass/render-in-superclass/render-in-subclass/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<x-component> | ||
<template shadowrootmode="open"> | ||
From subclass! foobar | ||
</template> | ||
</x-component> |
3 changes: 3 additions & 0 deletions
3
...server/src/__tests__/fixtures/superclass/render-in-superclass/render-in-subclass/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const tagName = 'x-component'; | ||
export { default } from 'x/component'; | ||
export * from 'x/component'; |
10 changes: 10 additions & 0 deletions
10
...tures/superclass/render-in-superclass/render-in-subclass/modules/x/component/component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import FancyElement from 'x/fancyElement' | ||
import sub from './sub.html' | ||
|
||
export default class extends FancyElement { | ||
hello = 'foobar' | ||
|
||
render() { | ||
return sub | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
.../fixtures/superclass/render-in-superclass/render-in-subclass/modules/x/component/sub.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
From subclass! {hello} | ||
</template> |
8 changes: 8 additions & 0 deletions
8
...superclass/render-in-superclass/render-in-subclass/modules/x/fancyElement/fancyElement.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { LightningElement } from 'lwc'; | ||
import tmpl from './tmpl.html' | ||
|
||
export default class extends LightningElement { | ||
render() { | ||
return tmpl | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...tures/superclass/render-in-superclass/render-in-subclass/modules/x/fancyElement/tmpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>{hello}</div> | ||
</template> |
Empty file.
7 changes: 7 additions & 0 deletions
7
...tests__/fixtures/superclass/render-in-superclass/unused-default-in-subclass/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<x-component> | ||
<template shadowrootmode="open"> | ||
<div> | ||
yolo | ||
</div> | ||
</template> | ||
</x-component> |
3 changes: 3 additions & 0 deletions
3
...rc/__tests__/fixtures/superclass/render-in-superclass/unused-default-in-subclass/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const tagName = 'x-component'; | ||
export { default } from 'x/component'; | ||
export * from 'x/component'; |
3 changes: 3 additions & 0 deletions
3
...rclass/render-in-superclass/unused-default-in-subclass/modules/x/component/component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
From subclass! {hello} | ||
</template> |
4 changes: 4 additions & 0 deletions
4
...perclass/render-in-superclass/unused-default-in-subclass/modules/x/component/component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import FancyElement from 'x/fancyElement' | ||
|
||
export default class extends FancyElement { | ||
} |
9 changes: 9 additions & 0 deletions
9
...ss/render-in-superclass/unused-default-in-subclass/modules/x/fancyElement/fancyElement.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { LightningElement } from 'lwc'; | ||
import tmpl from './tmpl.html' | ||
|
||
export default class extends LightningElement { | ||
hello = 'yolo' | ||
render() { | ||
return tmpl | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...perclass/render-in-superclass/unused-default-in-subclass/modules/x/fancyElement/tmpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>{hello}</div> | ||
</template> |
Empty file.
7 changes: 7 additions & 0 deletions
7
...sts__/fixtures/superclass/render-in-superclass/unused-default-in-superclass/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<x-component> | ||
<template shadowrootmode="open"> | ||
<div> | ||
foobar | ||
</div> | ||
</template> | ||
</x-component> |
3 changes: 3 additions & 0 deletions
3
.../__tests__/fixtures/superclass/render-in-superclass/unused-default-in-superclass/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const tagName = 'x-component'; | ||
export { default } from 'x/component'; | ||
export * from 'x/component'; |
5 changes: 5 additions & 0 deletions
5
...rclass/render-in-superclass/unused-default-in-superclass/modules/x/component/component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import FancyElement from 'x/fancyElement' | ||
|
||
export default class extends FancyElement { | ||
hello = 'foobar' | ||
} |
3 changes: 3 additions & 0 deletions
3
...ender-in-superclass/unused-default-in-superclass/modules/x/fancyElement/fancyElement.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
Don't use me!!! | ||
</template> |
8 changes: 8 additions & 0 deletions
8
.../render-in-superclass/unused-default-in-superclass/modules/x/fancyElement/fancyElement.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { LightningElement } from 'lwc'; | ||
import tmpl from './tmpl.html' | ||
|
||
export default class extends LightningElement { | ||
render() { | ||
return tmpl | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...rclass/render-in-superclass/unused-default-in-superclass/modules/x/fancyElement/tmpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>{hello}</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters