Revert accidental changes

pull/5139/head
Christopher Mardell 5 years ago
parent 83a86d0e72
commit db80d0c429

@ -11,7 +11,7 @@ import { ClassDeclaration, FunctionExpression, Node, Statement, ObjectExpression
export default function dom( export default function dom(
component: Component, component: Component,
options: CompileOptions options: CompileOptions
): { js: Node[]; css: CssResult } { ): { js: Node[]; css: CssResult; } {
const { name } = component; const { name } = component;
const renderer = new Renderer(component, options); const renderer = new Renderer(component, options);

@ -1,7 +1,7 @@
import * as assert from 'assert'; import * as assert from 'assert';
import CustomElement from './main.svelte'; import CustomElement from './main.svelte';
export default async function (target) { export default function (target) {
new CustomElement({ new CustomElement({
target target
}); });
@ -10,12 +10,14 @@ export default async function (target) {
const el = target.querySelector('custom-element'); const el = target.querySelector('custom-element');
const widget = el.shadowRoot.querySelector('my-widget'); const widget = el.shadowRoot.querySelector('my-widget');
const [p1, p2] = widget.shadowRoot.querySelectorAll('p'); const [p1, p2] = widget.shadowRoot.querySelectorAll('p');
assert.equal(p1.textContent, '3 items'); assert.equal(p1.textContent, '3 items');
assert.equal(p2.textContent, 'a, b, c'); assert.equal(p2.textContent, 'a, b, c');
el.items = ['d', 'e', 'f', 'g', 'h']; el.items = ['d', 'e', 'f', 'g', 'h'];
assert.equal(p1.textContent, '5 items'); assert.equal(p1.textContent, '5 items');
assert.equal(p2.textContent, 'd, e, f, g, h'); assert.equal(p2.textContent, 'd, e, f, g, h');
} }
Loading…
Cancel
Save