Skip to content

Commit ccf50cd

Browse files
author
Cameron Stitt
committed
3128: Test to show nested slots fails
1 parent 6af23ba commit ccf50cd

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

test/custom-elements/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ describe('custom-elements', function() {
105105

106106
const page = await browser.newPage();
107107

108-
page.on('console', (type, ...args) => {
109-
console[type](...args);
108+
page.on('console', msg => {
109+
for (let i = 0; i < msg.args().length; ++i)
110+
console[msg.type()](`${i}: ${msg.args()[i]}`);
110111
});
111112

112113
try {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<svelte:options tag="my-block"/>
2+
3+
<div><slot></slot></div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<svelte:options tag="my-app"/>
2+
3+
<script>
4+
import Block from './Block.svelte';
5+
</script>
6+
7+
<Block><strong>Name</strong></Block>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import * as assert from 'assert';
2+
import './main.svelte';
3+
4+
export default async function (target) {
5+
target.innerHTML = '<my-app/>';
6+
const el = target.querySelector('my-app');
7+
8+
const block = el.shadowRoot.children[0];
9+
10+
const [slot] = block.children;
11+
12+
assert.equal(slot.assignedNodes().length, 1);
13+
}

0 commit comments

Comments
 (0)