-
Notifications
You must be signed in to change notification settings - Fork 394
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 test for scoped slots with
lwc:is
(#4920)
- Loading branch information
1 parent
3aaf2f2
commit 468d1c7
Showing
10 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
...wc/engine-server/src/__tests__/fixtures/dynamic-components/slots/scoped-slots/config.json
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,6 @@ | ||
{ | ||
"ssrFiles": { | ||
"error": "error-ssr.txt", | ||
"expected": "expected-ssr.html" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
.../engine-server/src/__tests__/fixtures/dynamic-components/slots/scoped-slots/error-ssr.txt
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 @@ | ||
Template compilation failure; see warnings in the console. |
1 change: 1 addition & 0 deletions
1
...@lwc/engine-server/src/__tests__/fixtures/dynamic-components/slots/scoped-slots/error.txt
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 @@ | ||
LWC1178: <template> tag with lwc:slot-data directive must be the direct child of a custom element. |
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions
3
.../@lwc/engine-server/src/__tests__/fixtures/dynamic-components/slots/scoped-slots/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-dynamic-component'; | ||
export { default } from 'x/dynamic'; | ||
export * from 'x/dynamic'; |
7 changes: 7 additions & 0 deletions
7
...c/__tests__/fixtures/dynamic-components/slots/scoped-slots/modules/x/dynamic/dynamic.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 @@ | ||
<template> | ||
<lwc:component lwc:is={customCtor}> | ||
<template lwc:slot-data="data"> | ||
<span>{data.id} - {data.name}</span> | ||
</template> | ||
</lwc:component> | ||
</template> |
6 changes: 6 additions & 0 deletions
6
...src/__tests__/fixtures/dynamic-components/slots/scoped-slots/modules/x/dynamic/dynamic.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,6 @@ | ||
import { LightningElement, track } from 'lwc'; | ||
import Test from 'x/test'; | ||
|
||
export default class DynamicCtor extends LightningElement { | ||
@track customCtor = Test; | ||
} |
5 changes: 5 additions & 0 deletions
5
...ver/src/__tests__/fixtures/dynamic-components/slots/scoped-slots/modules/x/test/test.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 @@ | ||
<template lwc:render-mode="light"> | ||
a | ||
<slot lwc:slot-bind={item}>Default slot content</slot> | ||
b | ||
</template> |
5 changes: 5 additions & 0 deletions
5
...erver/src/__tests__/fixtures/dynamic-components/slots/scoped-slots/modules/x/test/test.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 Test extends LightningElement { | ||
static renderMode = 'light' | ||
} |