was created with unknown prop '${key}'`);
});
+ let { $$slots = {}, $$scope } = $$props;
+ validate_slots("Component", $$slots, []);
+
function div_binding($$value) {
binding_callbacks[$$value ? "unshift" : "push"](() => {
- node = $$value;
- $$invalidate(0, node);
+ $$invalidate(0, node = $$value);
});
}
diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js
index 867d4a7dad..0849a38b51 100644
--- a/test/js/samples/media-bindings/expected.js
+++ b/test/js/samples/media-bindings/expected.js
@@ -19,7 +19,6 @@ function create_fragment(ctx) {
let audio_updating = false;
let audio_animationframe;
let audio_is_paused = true;
- let mounted;
let dispose;
function audio_timeupdate_handler() {
@@ -43,7 +42,7 @@ function create_fragment(ctx) {
if (/*seeking*/ ctx[9] === void 0) add_render_callback(() => /*audio_seeking_seeked_handler*/ ctx[18].call(audio));
if (/*ended*/ ctx[10] === void 0) add_render_callback(() => /*audio_ended_handler*/ ctx[19].call(audio));
},
- m(target, anchor) {
+ m(target, anchor, remount) {
insert(target, audio, anchor);
if (!isNaN(/*volume*/ ctx[6])) {
@@ -56,23 +55,21 @@ function create_fragment(ctx) {
audio.playbackRate = /*playbackRate*/ ctx[8];
}
- if (!mounted) {
- dispose = [
- listen(audio, "progress", /*audio_progress_handler*/ ctx[11]),
- listen(audio, "loadedmetadata", /*audio_loadedmetadata_handler*/ ctx[12]),
- listen(audio, "timeupdate", audio_timeupdate_handler),
- listen(audio, "durationchange", /*audio_durationchange_handler*/ ctx[14]),
- listen(audio, "play", /*audio_play_pause_handler*/ ctx[15]),
- listen(audio, "pause", /*audio_play_pause_handler*/ ctx[15]),
- listen(audio, "volumechange", /*audio_volumechange_handler*/ ctx[16]),
- listen(audio, "ratechange", /*audio_ratechange_handler*/ ctx[17]),
- listen(audio, "seeking", /*audio_seeking_seeked_handler*/ ctx[18]),
- listen(audio, "seeked", /*audio_seeking_seeked_handler*/ ctx[18]),
- listen(audio, "ended", /*audio_ended_handler*/ ctx[19])
- ];
-
- mounted = true;
- }
+ if (remount) run_all(dispose);
+
+ dispose = [
+ listen(audio, "progress", /*audio_progress_handler*/ ctx[11]),
+ listen(audio, "loadedmetadata", /*audio_loadedmetadata_handler*/ ctx[12]),
+ listen(audio, "timeupdate", audio_timeupdate_handler),
+ listen(audio, "durationchange", /*audio_durationchange_handler*/ ctx[14]),
+ listen(audio, "play", /*audio_play_pause_handler*/ ctx[15]),
+ listen(audio, "pause", /*audio_play_pause_handler*/ ctx[15]),
+ listen(audio, "volumechange", /*audio_volumechange_handler*/ ctx[16]),
+ listen(audio, "ratechange", /*audio_ratechange_handler*/ ctx[17]),
+ listen(audio, "seeking", /*audio_seeking_seeked_handler*/ ctx[18]),
+ listen(audio, "seeked", /*audio_seeking_seeked_handler*/ ctx[18]),
+ listen(audio, "ended", /*audio_ended_handler*/ ctx[19])
+ ];
},
p(ctx, [dirty]) {
if (!audio_updating && dirty & /*currentTime*/ 8 && !isNaN(/*currentTime*/ ctx[3])) {
@@ -101,7 +98,6 @@ function create_fragment(ctx) {
o: noop,
d(detaching) {
if (detaching) detach(audio);
- mounted = false;
run_all(dispose);
}
};
@@ -173,7 +169,7 @@ function instance($$self, $$props, $$invalidate) {
$$invalidate(10, ended);
}
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("buffered" in $$props) $$invalidate(0, buffered = $$props.buffered);
if ("seekable" in $$props) $$invalidate(1, seekable = $$props.seekable);
if ("played" in $$props) $$invalidate(2, played = $$props.played);
diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js
index 5a6b8e8bb7..2784fd17ac 100644
--- a/test/js/samples/non-imported-component/expected.js
+++ b/test/js/samples/non-imported-component/expected.js
@@ -17,12 +17,10 @@ import {
import Imported from "Imported.svelte";
function create_fragment(ctx) {
- let imported;
let t;
- let nonimported;
let current;
- imported = new Imported({});
- nonimported = new NonImported({});
+ const imported = new Imported({});
+ const nonimported = new NonImported({});
return {
c() {
diff --git a/test/js/samples/optional-chaining/expected.js b/test/js/samples/optional-chaining/expected.js
deleted file mode 100644
index 8aa94796c1..0000000000
--- a/test/js/samples/optional-chaining/expected.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/* generated by Svelte vX.Y.Z */
-import {
- SvelteComponent,
- attr,
- create_component,
- destroy_component,
- detach,
- element,
- init,
- insert,
- mount_component,
- safe_not_equal,
- set_data,
- space,
- text,
- transition_in,
- transition_out
-} from "svelte/internal";
-
-function create_fragment(ctx) {
- let t0_value = /*a*/ ctx[0].normal + "";
- let t0;
- let t1_value = /*b*/ ctx[1]?.optional + "";
- let t1;
- let t2;
- let t3_value = /*c*/ ctx[2]["computed"] + "";
- let t3;
- let t4_value = /*d*/ ctx[3]?.["computed_optional"] + "";
- let t4;
- let t5;
- let t6_value = /*e*/ ctx[4]() + "";
- let t6;
- let t7_value = /*f*/ ctx[5]?.() + "";
- let t7;
- let t8;
- let div;
- let div_a_value;
- let div_b_value;
- let div_c_value;
- let div_d_value;
- let div_e_value;
- let div_f_value;
- let t9;
- let component;
- let current;
-
- component = new /*Component*/ ctx[6]({
- props: {
- a: /*a*/ ctx[0].normal,
- b: /*b*/ ctx[1]?.optional,
- c: /*c*/ ctx[2]["computed"],
- d: /*d*/ ctx[3]?.["computed_optional"],
- e: /*e*/ ctx[4](),
- f: /*f*/ ctx[5]?.()
- }
- });
-
- return {
- c() {
- t0 = text(t0_value);
- t1 = text(t1_value);
- t2 = space();
- t3 = text(t3_value);
- t4 = text(t4_value);
- t5 = space();
- t6 = text(t6_value);
- t7 = text(t7_value);
- t8 = space();
- div = element("div");
- t9 = space();
- create_component(component.$$.fragment);
- attr(div, "a", div_a_value = /*a*/ ctx[0].normal);
- attr(div, "b", div_b_value = /*b*/ ctx[1]?.optional);
- attr(div, "c", div_c_value = /*c*/ ctx[2]["computed"]);
- attr(div, "d", div_d_value = /*d*/ ctx[3]?.["computed_optional"]);
- attr(div, "e", div_e_value = /*e*/ ctx[4]());
- attr(div, "f", div_f_value = /*f*/ ctx[5]?.());
- },
- m(target, anchor) {
- insert(target, t0, anchor);
- insert(target, t1, anchor);
- insert(target, t2, anchor);
- insert(target, t3, anchor);
- insert(target, t4, anchor);
- insert(target, t5, anchor);
- insert(target, t6, anchor);
- insert(target, t7, anchor);
- insert(target, t8, anchor);
- insert(target, div, anchor);
- insert(target, t9, anchor);
- mount_component(component, target, anchor);
- current = true;
- },
- p(ctx, [dirty]) {
- if ((!current || dirty & /*a*/ 1) && t0_value !== (t0_value = /*a*/ ctx[0].normal + "")) set_data(t0, t0_value);
- if ((!current || dirty & /*b*/ 2) && t1_value !== (t1_value = /*b*/ ctx[1]?.optional + "")) set_data(t1, t1_value);
- if ((!current || dirty & /*c*/ 4) && t3_value !== (t3_value = /*c*/ ctx[2]["computed"] + "")) set_data(t3, t3_value);
- if ((!current || dirty & /*d*/ 8) && t4_value !== (t4_value = /*d*/ ctx[3]?.["computed_optional"] + "")) set_data(t4, t4_value);
- if ((!current || dirty & /*e*/ 16) && t6_value !== (t6_value = /*e*/ ctx[4]() + "")) set_data(t6, t6_value);
- if ((!current || dirty & /*f*/ 32) && t7_value !== (t7_value = /*f*/ ctx[5]?.() + "")) set_data(t7, t7_value);
-
- if (!current || dirty & /*a*/ 1 && div_a_value !== (div_a_value = /*a*/ ctx[0].normal)) {
- attr(div, "a", div_a_value);
- }
-
- if (!current || dirty & /*b*/ 2 && div_b_value !== (div_b_value = /*b*/ ctx[1]?.optional)) {
- attr(div, "b", div_b_value);
- }
-
- if (!current || dirty & /*c*/ 4 && div_c_value !== (div_c_value = /*c*/ ctx[2]["computed"])) {
- attr(div, "c", div_c_value);
- }
-
- if (!current || dirty & /*d*/ 8 && div_d_value !== (div_d_value = /*d*/ ctx[3]?.["computed_optional"])) {
- attr(div, "d", div_d_value);
- }
-
- if (!current || dirty & /*e*/ 16 && div_e_value !== (div_e_value = /*e*/ ctx[4]())) {
- attr(div, "e", div_e_value);
- }
-
- if (!current || dirty & /*f*/ 32 && div_f_value !== (div_f_value = /*f*/ ctx[5]?.())) {
- attr(div, "f", div_f_value);
- }
-
- const component_changes = {};
- if (dirty & /*a*/ 1) component_changes.a = /*a*/ ctx[0].normal;
- if (dirty & /*b*/ 2) component_changes.b = /*b*/ ctx[1]?.optional;
- if (dirty & /*c*/ 4) component_changes.c = /*c*/ ctx[2]["computed"];
- if (dirty & /*d*/ 8) component_changes.d = /*d*/ ctx[3]?.["computed_optional"];
- if (dirty & /*e*/ 16) component_changes.e = /*e*/ ctx[4]();
- if (dirty & /*f*/ 32) component_changes.f = /*f*/ ctx[5]?.();
- component.$set(component_changes);
- },
- i(local) {
- if (current) return;
- transition_in(component.$$.fragment, local);
- current = true;
- },
- o(local) {
- transition_out(component.$$.fragment, local);
- current = false;
- },
- d(detaching) {
- if (detaching) detach(t0);
- if (detaching) detach(t1);
- if (detaching) detach(t2);
- if (detaching) detach(t3);
- if (detaching) detach(t4);
- if (detaching) detach(t5);
- if (detaching) detach(t6);
- if (detaching) detach(t7);
- if (detaching) detach(t8);
- if (detaching) detach(div);
- if (detaching) detach(t9);
- destroy_component(component, detaching);
- }
- };
-}
-
-function instance($$self, $$props, $$invalidate) {
- let { a } = $$props;
- let { b } = $$props;
- let { c } = $$props;
- let { d } = $$props;
- let { e } = $$props;
- let { f } = $$props;
- let Component;
-
- $$self.$$set = $$props => {
- if ("a" in $$props) $$invalidate(0, a = $$props.a);
- if ("b" in $$props) $$invalidate(1, b = $$props.b);
- if ("c" in $$props) $$invalidate(2, c = $$props.c);
- if ("d" in $$props) $$invalidate(3, d = $$props.d);
- if ("e" in $$props) $$invalidate(4, e = $$props.e);
- if ("f" in $$props) $$invalidate(5, f = $$props.f);
- };
-
- return [a, b, c, d, e, f, Component];
-}
-
-class Component_1 extends SvelteComponent {
- constructor(options) {
- super();
- init(this, options, instance, create_fragment, safe_not_equal, { a: 0, b: 1, c: 2, d: 3, e: 4, f: 5 });
- }
-}
-
-export default Component_1;
\ No newline at end of file
diff --git a/test/js/samples/optional-chaining/input.svelte b/test/js/samples/optional-chaining/input.svelte
deleted file mode 100644
index 78edf2ca85..0000000000
--- a/test/js/samples/optional-chaining/input.svelte
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-{a.normal}{b?.optional}
-{c['computed']}{d?.['computed_optional']}
-{e()}{f?.()}
-
-
-
-
diff --git a/test/js/samples/reactive-values-non-topologically-ordered/expected.js b/test/js/samples/reactive-values-non-topologically-ordered/expected.js
index 15290496d5..3d266f10ac 100644
--- a/test/js/samples/reactive-values-non-topologically-ordered/expected.js
+++ b/test/js/samples/reactive-values-non-topologically-ordered/expected.js
@@ -6,7 +6,7 @@ function instance($$self, $$props, $$invalidate) {
let a;
let b;
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("x" in $$props) $$invalidate(0, x = $$props.x);
};
diff --git a/test/js/samples/reactive-values-non-writable-dependencies/expected.js b/test/js/samples/reactive-values-non-writable-dependencies/expected.js
index 5196a770d9..38bd356d85 100644
--- a/test/js/samples/reactive-values-non-writable-dependencies/expected.js
+++ b/test/js/samples/reactive-values-non-writable-dependencies/expected.js
@@ -5,7 +5,7 @@ function instance($$self, $$props, $$invalidate) {
let { a = 1 } = $$props;
let { b = 2 } = $$props;
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("a" in $$props) $$invalidate(0, a = $$props.a);
if ("b" in $$props) $$invalidate(1, b = $$props.b);
};
diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js
index 8777cd2600..a93a47bd3a 100644
--- a/test/js/samples/select-dynamic-value/expected.js
+++ b/test/js/samples/select-dynamic-value/expected.js
@@ -7,14 +7,14 @@ import {
init,
insert,
noop,
- safe_not_equal,
- select_option
+ safe_not_equal
} from "svelte/internal";
function create_fragment(ctx) {
let select;
let option0;
let option1;
+ let select_value_value;
return {
c() {
@@ -32,11 +32,27 @@ function create_fragment(ctx) {
insert(target, select, anchor);
append(select, option0);
append(select, option1);
- select_option(select, /*current*/ ctx[0]);
+ select_value_value = /*current*/ ctx[0];
+
+ for (var i = 0; i < select.options.length; i += 1) {
+ var option = select.options[i];
+
+ if (option.__value === select_value_value) {
+ option.selected = true;
+ break;
+ }
+ }
},
p(ctx, [dirty]) {
- if (dirty & /*current*/ 1) {
- select_option(select, /*current*/ ctx[0]);
+ if (dirty & /*current*/ 1 && select_value_value !== (select_value_value = /*current*/ ctx[0])) {
+ for (var i = 0; i < select.options.length; i += 1) {
+ var option = select.options[i];
+
+ if (option.__value === select_value_value) {
+ option.selected = true;
+ break;
+ }
+ }
}
},
i: noop,
@@ -50,7 +66,7 @@ function create_fragment(ctx) {
function instance($$self, $$props, $$invalidate) {
let { current } = $$props;
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("current" in $$props) $$invalidate(0, current = $$props.current);
};
diff --git a/test/js/samples/src-attribute-check/expected.js b/test/js/samples/src-attribute-check/expected.js
index 93638edfb4..e03b3a6ba7 100644
--- a/test/js/samples/src-attribute-check/expected.js
+++ b/test/js/samples/src-attribute-check/expected.js
@@ -67,7 +67,7 @@ function instance($$self, $$props, $$invalidate) {
let { url } = $$props;
let { slug } = $$props;
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("url" in $$props) $$invalidate(0, url = $$props.url);
if ("slug" in $$props) $$invalidate(1, slug = $$props.slug);
};
diff --git a/test/js/samples/ssr-no-oncreate-etc/expected.js b/test/js/samples/ssr-no-oncreate-etc/expected.js
index b91deb3e97..803f06a882 100644
--- a/test/js/samples/ssr-no-oncreate-etc/expected.js
+++ b/test/js/samples/ssr-no-oncreate-etc/expected.js
@@ -15,7 +15,7 @@ function swipe(node, callback) {
} // TODO implement
-const Component = create_ssr_component(($$result, $$props, $$bindings, slots) => {
+const Component = create_ssr_component(($$result, $$props, $$bindings, $$slots) => {
onMount(() => {
console.log("onMount");
});
diff --git a/test/js/samples/ssr-preserve-comments/expected.js b/test/js/samples/ssr-preserve-comments/expected.js
index de9fa7582e..1dc12710c0 100644
--- a/test/js/samples/ssr-preserve-comments/expected.js
+++ b/test/js/samples/ssr-preserve-comments/expected.js
@@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { create_ssr_component } from "svelte/internal";
-const Component = create_ssr_component(($$result, $$props, $$bindings, slots) => {
+const Component = create_ssr_component(($$result, $$props, $$bindings, $$slots) => {
return `content
more content
`;
diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js
index b10f569759..d4e7e1a584 100644
--- a/test/js/samples/title/expected.js
+++ b/test/js/samples/title/expected.js
@@ -22,7 +22,7 @@ function create_fragment(ctx) {
function instance($$self, $$props, $$invalidate) {
let { custom } = $$props;
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("custom" in $$props) $$invalidate(0, custom = $$props.custom);
};
diff --git a/test/js/samples/transition-local/expected.js b/test/js/samples/transition-local/expected.js
index ea3d9db3d7..25a03f026f 100644
--- a/test/js/samples/transition-local/expected.js
+++ b/test/js/samples/transition-local/expected.js
@@ -124,7 +124,7 @@ function instance($$self, $$props, $$invalidate) {
let { x } = $$props;
let { y } = $$props;
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("x" in $$props) $$invalidate(0, x = $$props.x);
if ("y" in $$props) $$invalidate(1, y = $$props.y);
};
diff --git a/test/js/samples/transition-repeated-outro/expected.js b/test/js/samples/transition-repeated-outro/expected.js
index 12483ab91a..1f76a93666 100644
--- a/test/js/samples/transition-repeated-outro/expected.js
+++ b/test/js/samples/transition-repeated-outro/expected.js
@@ -102,7 +102,7 @@ function create_fragment(ctx) {
function instance($$self, $$props, $$invalidate) {
let { num = 1 } = $$props;
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("num" in $$props) $$invalidate(0, num = $$props.num);
};
diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js
index d07411518e..5be8808edb 100644
--- a/test/js/samples/use-elements-as-anchors/expected.js
+++ b/test/js/samples/use-elements-as-anchors/expected.js
@@ -243,7 +243,7 @@ function instance($$self, $$props, $$invalidate) {
let { d } = $$props;
let { e } = $$props;
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("a" in $$props) $$invalidate(0, a = $$props.a);
if ("b" in $$props) $$invalidate(1, b = $$props.b);
if ("c" in $$props) $$invalidate(2, c = $$props.c);
diff --git a/test/js/samples/video-bindings/expected.js b/test/js/samples/video-bindings/expected.js
index 8afa670bbb..9c5467e1a0 100644
--- a/test/js/samples/video-bindings/expected.js
+++ b/test/js/samples/video-bindings/expected.js
@@ -19,7 +19,6 @@ function create_fragment(ctx) {
let video_updating = false;
let video_animationframe;
let video_resize_listener;
- let mounted;
let dispose;
function video_timeupdate_handler() {
@@ -39,18 +38,15 @@ function create_fragment(ctx) {
if (/*videoHeight*/ ctx[1] === void 0 || /*videoWidth*/ ctx[2] === void 0) add_render_callback(() => /*video_resize_handler*/ ctx[5].call(video));
add_render_callback(() => /*video_elementresize_handler*/ ctx[6].call(video));
},
- m(target, anchor) {
+ m(target, anchor, remount) {
insert(target, video, anchor);
video_resize_listener = add_resize_listener(video, /*video_elementresize_handler*/ ctx[6].bind(video));
+ if (remount) run_all(dispose);
- if (!mounted) {
- dispose = [
- listen(video, "timeupdate", video_timeupdate_handler),
- listen(video, "resize", /*video_resize_handler*/ ctx[5])
- ];
-
- mounted = true;
- }
+ dispose = [
+ listen(video, "timeupdate", video_timeupdate_handler),
+ listen(video, "resize", /*video_resize_handler*/ ctx[5])
+ ];
},
p(ctx, [dirty]) {
if (!video_updating && dirty & /*currentTime*/ 1 && !isNaN(/*currentTime*/ ctx[0])) {
@@ -64,7 +60,6 @@ function create_fragment(ctx) {
d(detaching) {
if (detaching) detach(video);
video_resize_listener();
- mounted = false;
run_all(dispose);
}
};
@@ -93,7 +88,7 @@ function instance($$self, $$props, $$invalidate) {
$$invalidate(3, offsetWidth);
}
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("currentTime" in $$props) $$invalidate(0, currentTime = $$props.currentTime);
if ("videoHeight" in $$props) $$invalidate(1, videoHeight = $$props.videoHeight);
if ("videoWidth" in $$props) $$invalidate(2, videoWidth = $$props.videoWidth);
diff --git a/test/js/samples/window-binding-online/expected.js b/test/js/samples/window-binding-online/expected.js
index 887195bce1..fa955e4fd5 100644
--- a/test/js/samples/window-binding-online/expected.js
+++ b/test/js/samples/window-binding-online/expected.js
@@ -10,27 +10,23 @@ import {
} from "svelte/internal";
function create_fragment(ctx) {
- let mounted;
let dispose;
add_render_callback(/*onlinestatuschanged*/ ctx[1]);
return {
c: noop,
- m(target, anchor) {
- if (!mounted) {
- dispose = [
- listen(window, "online", /*onlinestatuschanged*/ ctx[1]),
- listen(window, "offline", /*onlinestatuschanged*/ ctx[1])
- ];
-
- mounted = true;
- }
+ m(target, anchor, remount) {
+ if (remount) run_all(dispose);
+
+ dispose = [
+ listen(window, "online", /*onlinestatuschanged*/ ctx[1]),
+ listen(window, "offline", /*onlinestatuschanged*/ ctx[1])
+ ];
},
p: noop,
i: noop,
o: noop,
d(detaching) {
- mounted = false;
run_all(dispose);
}
};
diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js
index 09a4d3737d..30723cc142 100644
--- a/test/js/samples/window-binding-scroll/expected.js
+++ b/test/js/samples/window-binding-scroll/expected.js
@@ -25,7 +25,6 @@ function create_fragment(ctx) {
let p;
let t0;
let t1;
- let mounted;
let dispose;
add_render_callback(/*onwindowscroll*/ ctx[1]);
@@ -35,21 +34,18 @@ function create_fragment(ctx) {
t0 = text("scrolled to ");
t1 = text(/*y*/ ctx[0]);
},
- m(target, anchor) {
+ m(target, anchor, remount) {
insert(target, p, anchor);
append(p, t0);
append(p, t1);
+ if (remount) dispose();
- if (!mounted) {
- dispose = listen(window, "scroll", () => {
- scrolling = true;
- clearTimeout(scrolling_timeout);
- scrolling_timeout = setTimeout(clear_scrolling, 100);
- /*onwindowscroll*/ ctx[1]();
- });
-
- mounted = true;
- }
+ dispose = listen(window, "scroll", () => {
+ scrolling = true;
+ clearTimeout(scrolling_timeout);
+ scrolling_timeout = setTimeout(clear_scrolling, 100);
+ /*onwindowscroll*/ ctx[1]();
+ });
},
p(ctx, [dirty]) {
if (dirty & /*y*/ 1 && !scrolling) {
@@ -65,7 +61,6 @@ function create_fragment(ctx) {
o: noop,
d(detaching) {
if (detaching) detach(p);
- mounted = false;
dispose();
}
};
@@ -78,7 +73,7 @@ function instance($$self, $$props, $$invalidate) {
$$invalidate(0, y = window.pageYOffset)
}
- $$self.$$set = $$props => {
+ $$self.$set = $$props => {
if ("y" in $$props) $$invalidate(0, y = $$props.y);
};
diff --git a/test/parser/index.js b/test/parser/index.js
index 2c8d516a7d..27c5ec1563 100644
--- a/test/parser/index.js
+++ b/test/parser/index.js
@@ -20,7 +20,7 @@ describe('parse', () => {
(skip ? it.skip : solo ? it.only : it)(dir, () => {
const options = tryToLoadJson(`${__dirname}/samples/${dir}/options.json`) || {};
- const input = fs.readFileSync(`${__dirname}/samples/${dir}/input.svelte`, 'utf-8').replace(/\s+$/, '').replace(/\r/g, "");
+ const input = fs.readFileSync(`${__dirname}/samples/${dir}/input.svelte`, 'utf-8').replace(/\s+$/, '');
const expectedOutput = tryToLoadJson(`${__dirname}/samples/${dir}/output.json`);
const expectedError = tryToLoadJson(`${__dirname}/samples/${dir}/error.json`);
@@ -38,9 +38,13 @@ describe('parse', () => {
} catch (err) {
if (err.name !== 'ParseError') throw err;
if (!expectedError) throw err;
- const { code, message, pos, start } = err
+
try {
- assert.deepEqual({ code, message, pos, start }, expectedError);
+ assert.equal(err.code, expectedError.code);
+ assert.equal(err.message, expectedError.message);
+ assert.deepEqual(err.start, expectedError.start);
+ assert.equal(err.pos, expectedError.pos);
+ assert.equal(err.toString().split('\n')[0], `${expectedError.message} (${expectedError.start.line}:${expectedError.start.column})`);
} catch (err2) {
const e = err2.code === 'MODULE_NOT_FOUND' ? err : err2;
throw e;
diff --git a/test/parser/samples/action-with-call/output.json b/test/parser/samples/action-with-call/output.json
index 66c569dc5a..ccb4011c67 100644
--- a/test/parser/samples/action-with-call/output.json
+++ b/test/parser/samples/action-with-call/output.json
@@ -64,8 +64,7 @@
"value": "tooltip msg",
"raw": "'tooltip msg'"
}
- ],
- "optional": false
+ ]
}
}
],
diff --git a/test/parser/samples/animation/output.json b/test/parser/samples/animation/output.json
index 11195009c8..1958ba2817 100644
--- a/test/parser/samples/animation/output.json
+++ b/test/parser/samples/animation/output.json
@@ -52,10 +52,10 @@
}
],
"context": {
- "type": "Identifier",
- "name": "thing",
"start": 17,
- "end": 22
+ "end": 22,
+ "type": "Identifier",
+ "name": "thing"
},
"key": {
"type": "Identifier",
diff --git a/test/parser/samples/await-catch/output.json b/test/parser/samples/await-catch/output.json
index 91862b5366..c543583018 100644
--- a/test/parser/samples/await-catch/output.json
+++ b/test/parser/samples/await-catch/output.json
@@ -26,10 +26,10 @@
},
"value": null,
"error": {
- "type": "Identifier",
- "name": "theError",
"start": 47,
- "end": 55
+ "end": 55,
+ "type": "Identifier",
+ "name": "theError"
},
"pending": {
"start": 19,
@@ -152,8 +152,7 @@
},
"name": "message"
},
- "computed": false,
- "optional": false
+ "computed": false
}
}
]
diff --git a/test/parser/samples/await-then-catch/output.json b/test/parser/samples/await-then-catch/output.json
index e377d3fa3e..8e4b7a4c32 100644
--- a/test/parser/samples/await-then-catch/output.json
+++ b/test/parser/samples/await-then-catch/output.json
@@ -25,16 +25,16 @@
"name": "thePromise"
},
"value": {
- "type": "Identifier",
- "name": "theValue",
"start": 46,
- "end": 54
+ "end": 54,
+ "type": "Identifier",
+ "name": "theValue"
},
"error": {
- "type": "Identifier",
- "name": "theError",
"start": 96,
- "end": 104
+ "end": 104,
+ "type": "Identifier",
+ "name": "theError"
},
"pending": {
"start": 19,
@@ -209,8 +209,7 @@
},
"name": "message"
},
- "computed": false,
- "optional": false
+ "computed": false
}
}
]
diff --git a/test/parser/samples/dynamic-import/output.json b/test/parser/samples/dynamic-import/output.json
index ed3d58782d..1e41252afa 100644
--- a/test/parser/samples/dynamic-import/output.json
+++ b/test/parser/samples/dynamic-import/output.json
@@ -275,8 +275,7 @@
},
"name": "then"
},
- "computed": false,
- "optional": false
+ "computed": false
},
"arguments": [
{
@@ -404,8 +403,7 @@
},
"name": "log"
},
- "computed": false,
- "optional": false
+ "computed": false
},
"arguments": [
{
@@ -454,25 +452,21 @@
},
"name": "default"
},
- "computed": false,
- "optional": false
+ "computed": false
}
- ],
- "optional": false
+ ]
}
}
]
}
}
- ],
- "optional": false
+ ]
}
}
]
}
}
- ],
- "optional": false
+ ]
}
}
],
diff --git a/test/parser/samples/each-block-else/output.json b/test/parser/samples/each-block-else/output.json
index 622789d177..2720ce5292 100644
--- a/test/parser/samples/each-block-else/output.json
+++ b/test/parser/samples/each-block-else/output.json
@@ -57,10 +57,10 @@
}
],
"context": {
- "type": "Identifier",
- "name": "animal",
"start": 18,
- "end": 24
+ "end": 24,
+ "type": "Identifier",
+ "name": "animal"
},
"else": {
"start": 50,
diff --git a/test/parser/samples/each-block-indexed/output.json b/test/parser/samples/each-block-indexed/output.json
index 01b97ffcb4..50f2000a36 100644
--- a/test/parser/samples/each-block-indexed/output.json
+++ b/test/parser/samples/each-block-indexed/output.json
@@ -85,10 +85,10 @@
}
],
"context": {
- "type": "Identifier",
- "name": "animal",
"start": 18,
- "end": 24
+ "end": 24,
+ "type": "Identifier",
+ "name": "animal"
},
"index": "i"
}
diff --git a/test/parser/samples/each-block-keyed/output.json b/test/parser/samples/each-block-keyed/output.json
index 6eaf19a82d..7dc8681453 100644
--- a/test/parser/samples/each-block-keyed/output.json
+++ b/test/parser/samples/each-block-keyed/output.json
@@ -57,10 +57,10 @@
}
],
"context": {
- "type": "Identifier",
- "name": "todo",
"start": 16,
- "end": 20
+ "end": 20,
+ "type": "Identifier",
+ "name": "todo"
},
"key": {
"type": "MemberExpression",
@@ -108,8 +108,7 @@
},
"name": "id"
},
- "computed": false,
- "optional": false
+ "computed": false
}
}
]
diff --git a/test/parser/samples/each-block/output.json b/test/parser/samples/each-block/output.json
index 82d4455d19..6594fb50a6 100644
--- a/test/parser/samples/each-block/output.json
+++ b/test/parser/samples/each-block/output.json
@@ -57,10 +57,10 @@
}
],
"context": {
- "type": "Identifier",
- "name": "animal",
"start": 18,
- "end": 24
+ "end": 24,
+ "type": "Identifier",
+ "name": "animal"
}
}
]
diff --git a/test/parser/samples/error-css-global-without-selector/error.json b/test/parser/samples/error-css-global-without-selector/error.json
deleted file mode 100644
index f4237c65d3..0000000000
--- a/test/parser/samples/error-css-global-without-selector/error.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "code": "css-syntax-error",
- "message": ":global() must contain a selector",
- "start": {
- "line": 2,
- "column": 1,
- "character": 9
- },
- "pos": 9
-}
diff --git a/test/parser/samples/error-css-global-without-selector/input.svelte b/test/parser/samples/error-css-global-without-selector/input.svelte
deleted file mode 100644
index a626136cfc..0000000000
--- a/test/parser/samples/error-css-global-without-selector/input.svelte
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/test/parser/samples/error-unmatched-closing-tag-autoclose-2/error.json b/test/parser/samples/error-unmatched-closing-tag-autoclose-2/error.json
deleted file mode 100644
index d24296bd96..0000000000
--- a/test/parser/samples/error-unmatched-closing-tag-autoclose-2/error.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "code": "invalid-closing-tag",
- "message": " attempted to close an element that was not open",
- "pos": 38,
- "start": {
- "character": 38,
- "column": 0,
- "line": 5
- }
-}
diff --git a/test/parser/samples/error-unmatched-closing-tag-autoclose-2/input.svelte b/test/parser/samples/error-unmatched-closing-tag-autoclose-2/input.svelte
deleted file mode 100644
index 5182577921..0000000000
--- a/test/parser/samples/error-unmatched-closing-tag-autoclose-2/input.svelte
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
\ No newline at end of file
diff --git a/test/parser/samples/error-unmatched-closing-tag-autoclose/error.json b/test/parser/samples/error-unmatched-closing-tag-autoclose/error.json
deleted file mode 100644
index e6532d747e..0000000000
--- a/test/parser/samples/error-unmatched-closing-tag-autoclose/error.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "code": "invalid-closing-tag",
- "message": " attempted to close that was already automatically closed by
",
- "pos": 24,
- "start": {
- "character": 24,
- "column": 0,
- "line": 3
- }
-}
diff --git a/test/parser/samples/error-unmatched-closing-tag-autoclose/input.svelte b/test/parser/samples/error-unmatched-closing-tag-autoclose/input.svelte
deleted file mode 100644
index 0bfd609736..0000000000
--- a/test/parser/samples/error-unmatched-closing-tag-autoclose/input.svelte
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
pre tag
-
\ No newline at end of file
diff --git a/test/parser/samples/no-error-if-before-closing/output.json b/test/parser/samples/no-error-if-before-closing/output.json
index f22586b267..708128a42e 100644
--- a/test/parser/samples/no-error-if-before-closing/output.json
+++ b/test/parser/samples/no-error-if-before-closing/output.json
@@ -116,10 +116,10 @@
"raw": "true"
},
"value": {
- "type": "Identifier",
- "name": "f",
"start": 97,
- "end": 98
+ "end": 98,
+ "type": "Identifier",
+ "name": "f"
},
"error": null,
"pending": {
@@ -204,10 +204,10 @@
"raw": "true"
},
"value": {
- "type": "Identifier",
- "name": "f",
"start": 137,
- "end": 138
+ "end": 138,
+ "type": "Identifier",
+ "name": "f"
},
"error": null,
"pending": {
diff --git a/test/parser/samples/unusual-identifier/output.json b/test/parser/samples/unusual-identifier/output.json
index 3d209d35fe..76cc82cfd6 100644
--- a/test/parser/samples/unusual-identifier/output.json
+++ b/test/parser/samples/unusual-identifier/output.json
@@ -57,10 +57,10 @@
}
],
"context": {
- "type": "Identifier",
- "name": "𐊧",
"start": 17,
- "end": 19
+ "end": 19,
+ "type": "Identifier",
+ "name": "𐊧"
}
}
]
diff --git a/test/preprocess/samples/comments/_config.js b/test/preprocess/samples/comments/_config.js
index fdec377567..4416d121d0 100644
--- a/test/preprocess/samples/comments/_config.js
+++ b/test/preprocess/samples/comments/_config.js
@@ -2,7 +2,7 @@ export default {
preprocess: [
{
script: ({ content }) => ({ code: content.replace(/one/g, 'two') }),
- style: ({ content }) => ({ code: content.replace(/one/g, 'three') })
- }
- ]
+ style: ({ content }) => ({ code: content.replace(/one/g, 'three') }),
+ },
+ ],
};
diff --git a/test/preprocess/samples/script-self-closing/_config.js b/test/preprocess/samples/script-self-closing/_config.js
deleted file mode 100644
index 4baab9730e..0000000000
--- a/test/preprocess/samples/script-self-closing/_config.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import * as assert from "assert";
-
-export default {
- preprocess: {
- script: ({ content, attributes }) => {
- assert.equal(content, "");
- return {
- code: `console.log("${attributes["the-answer"]}");`
- };
- }
- }
-};
diff --git a/test/preprocess/samples/script-self-closing/input.svelte b/test/preprocess/samples/script-self-closing/input.svelte
deleted file mode 100644
index c5816cb3ba..0000000000
--- a/test/preprocess/samples/script-self-closing/input.svelte
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/test/preprocess/samples/script-self-closing/output.svelte b/test/preprocess/samples/script-self-closing/output.svelte
deleted file mode 100644
index 2912876880..0000000000
--- a/test/preprocess/samples/script-self-closing/output.svelte
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/test/preprocess/samples/style-self-closing/_config.js b/test/preprocess/samples/style-self-closing/_config.js
deleted file mode 100644
index 0a05cd3d64..0000000000
--- a/test/preprocess/samples/style-self-closing/_config.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import * as assert from "assert";
-
-export default {
- preprocess: {
- style: ({ content, attributes: { color } }) => {
- assert.equal(content, "");
- return {
- code: `div { color: ${color}; }`
- };
- }
- }
-};
diff --git a/test/preprocess/samples/style-self-closing/input.svelte b/test/preprocess/samples/style-self-closing/input.svelte
deleted file mode 100644
index 07176c87e5..0000000000
--- a/test/preprocess/samples/style-self-closing/input.svelte
+++ /dev/null
@@ -1,3 +0,0 @@
-$brand
-
-
\ No newline at end of file
diff --git a/test/preprocess/samples/style-self-closing/output.svelte b/test/preprocess/samples/style-self-closing/output.svelte
deleted file mode 100644
index c376cd00cb..0000000000
--- a/test/preprocess/samples/style-self-closing/output.svelte
+++ /dev/null
@@ -1,3 +0,0 @@
-$brand
-
-
\ No newline at end of file
diff --git a/test/runtime/index.js b/test/runtime/index.js
index 65157196c9..f070eb8185 100644
--- a/test/runtime/index.js
+++ b/test/runtime/index.js
@@ -39,7 +39,7 @@ describe("runtime", () => {
filename
}, compileOptions);
- const { js: { code } } = compile(fs.readFileSync(filename, "utf-8").replace(/\r/g, ""), options);
+ const { js: { code } } = compile(fs.readFileSync(filename, "utf-8"), options);
return module._compile(code, filename);
};
@@ -103,7 +103,7 @@ describe("runtime", () => {
try {
const { js } = compile(
- fs.readFileSync(`${cwd}/${file}`, 'utf-8').replace(/\r/g, ""),
+ fs.readFileSync(`${cwd}/${file}`, 'utf-8'),
{
...compileOptions,
filename: file
diff --git a/test/runtime/samples/$$rest-without-props/_config.js b/test/runtime/samples/$$rest-without-props/_config.js
index 1fb8e85a6a..017f9df561 100644
--- a/test/runtime/samples/$$rest-without-props/_config.js
+++ b/test/runtime/samples/$$rest-without-props/_config.js
@@ -11,7 +11,7 @@ export default {
`,
- async test({ assert, target, window }) {
+ async test({ assert, target, window, }) {
const [btn1, btn2, btn3, btn4] = target.querySelectorAll('button');
const clickEvent = new window.MouseEvent('click');
diff --git a/test/runtime/samples/$$rest/_config.js b/test/runtime/samples/$$rest/_config.js
index f00c26d712..255927f354 100644
--- a/test/runtime/samples/$$rest/_config.js
+++ b/test/runtime/samples/$$rest/_config.js
@@ -13,7 +13,7 @@ export default {
`,
- async test({ assert, target, window }) {
+ async test({ assert, target, window, }) {
const [btn1, btn2, btn3, btn4] = target.querySelectorAll('button');
const clickEvent = new window.MouseEvent('click');
diff --git a/test/runtime/samples/$$slot/A.svelte b/test/runtime/samples/$$slot/A.svelte
deleted file mode 100644
index ffa166166c..0000000000
--- a/test/runtime/samples/$$slot/A.svelte
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-$$slots: {toString($$slots)}
-
-{#if $$slots.b}
-
-
-
-{:else}
- Slot b is not available
-{/if}
\ No newline at end of file
diff --git a/test/runtime/samples/$$slot/_config.js b/test/runtime/samples/$$slot/_config.js
deleted file mode 100644
index 13b2137cdb..0000000000
--- a/test/runtime/samples/$$slot/_config.js
+++ /dev/null
@@ -1,18 +0,0 @@
-export default {
- html: `
- bye world
- hello world
- $$slots: {"a":true,"default":true}
- Slot b is not available
-
- bye world
- hello world
- $$slots: {"a":true,"b":true,"default":true}
- hello world
- `,
-
- async test({ assert, target, component }) {
- assert.equal(component.getA(), '');
- assert.equal(component.getB(), 'foo');
- }
-};
diff --git a/test/runtime/samples/$$slot/main.svelte b/test/runtime/samples/$$slot/main.svelte
deleted file mode 100644
index 8b7efae573..0000000000
--- a/test/runtime/samples/$$slot/main.svelte
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- hello world
- bye
- world
-
-
-
- hello world
- hello world
- bye world
-
diff --git a/test/runtime/samples/action-custom-event-handler-this/_config.js b/test/runtime/samples/action-custom-event-handler-this/_config.js
index 754f813c7f..88a30232ab 100644
--- a/test/runtime/samples/action-custom-event-handler-this/_config.js
+++ b/test/runtime/samples/action-custom-event-handler-this/_config.js
@@ -18,5 +18,5 @@ export default {
input.dispatchEvent(event);
assert.ok(blurred);
- }
+ },
};
diff --git a/test/runtime/samples/action-ternary-template/_config.js b/test/runtime/samples/action-ternary-template/_config.js
index ecb18dceec..adf23a9f68 100644
--- a/test/runtime/samples/action-ternary-template/_config.js
+++ b/test/runtime/samples/action-ternary-template/_config.js
@@ -1,7 +1,7 @@
export default {
props: {
target: 'World!',
- display: true
+ display: true,
},
html: `
@@ -16,5 +16,5 @@ export default {
assert.htmlEqual(target.innerHTML, `
Hello World!
`);
- }
+ },
};
diff --git a/test/runtime/samples/action-this/_config.js b/test/runtime/samples/action-this/_config.js
index c59ff3b634..de7f834cdc 100644
--- a/test/runtime/samples/action-this/_config.js
+++ b/test/runtime/samples/action-this/_config.js
@@ -7,5 +7,5 @@ export default {
await button.dispatchEvent(click);
await Promise.resolve();
assert.htmlEqual(target.innerHTML, `2 `);
- }
+ },
};
diff --git a/test/runtime/samples/apply-directives-in-order-2/_config.js b/test/runtime/samples/apply-directives-in-order-2/_config.js
index caff97a5b9..a74ce41cb6 100644
--- a/test/runtime/samples/apply-directives-in-order-2/_config.js
+++ b/test/runtime/samples/apply-directives-in-order-2/_config.js
@@ -1,7 +1,7 @@
const value = [];
export default {
props: {
- value
+ value,
},
async test({ assert, component, target, window }) {
@@ -32,7 +32,7 @@ export default {
'15',
'16',
'17',
- '18'
+ '18',
]);
- }
+ },
};
diff --git a/test/runtime/samples/apply-directives-in-order/_config.js b/test/runtime/samples/apply-directives-in-order/_config.js
index 7c8f87ef85..e5e8980ed1 100644
--- a/test/runtime/samples/apply-directives-in-order/_config.js
+++ b/test/runtime/samples/apply-directives-in-order/_config.js
@@ -33,5 +33,5 @@ export default {
HE
`);
- }
+ },
};
diff --git a/test/runtime/samples/attribute-boolean-false/_config.js b/test/runtime/samples/attribute-boolean-false/_config.js
index e47c5e7df1..14fdeb9fdc 100644
--- a/test/runtime/samples/attribute-boolean-false/_config.js
+++ b/test/runtime/samples/attribute-boolean-false/_config.js
@@ -3,5 +3,5 @@ export default {
test({ assert, component, target }) {
const textarea = target.querySelector('textarea');
assert.ok(textarea.readOnly === false);
- }
+ },
};
diff --git a/test/runtime/samples/attribute-boolean-true/_config.js b/test/runtime/samples/attribute-boolean-true/_config.js
index 1f77e33027..0e402ed1e3 100644
--- a/test/runtime/samples/attribute-boolean-true/_config.js
+++ b/test/runtime/samples/attribute-boolean-true/_config.js
@@ -3,5 +3,5 @@ export default {
test({ assert, component, target }) {
const textarea = target.querySelector('textarea');
assert.ok(textarea.readOnly);
- }
+ },
};
diff --git a/test/runtime/samples/attribute-dataset-without-value/_config.js b/test/runtime/samples/attribute-dataset-without-value/_config.js
index 21e60b92aa..934f44eb06 100644
--- a/test/runtime/samples/attribute-dataset-without-value/_config.js
+++ b/test/runtime/samples/attribute-dataset-without-value/_config.js
@@ -1,3 +1,3 @@
export default {
- html: '
'
+ html: '
',
};
diff --git a/test/runtime/samples/attribute-dynamic-no-dependencies/_config.js b/test/runtime/samples/attribute-dynamic-no-dependencies/_config.js
index f1088830af..acf3c64bdd 100644
--- a/test/runtime/samples/attribute-dynamic-no-dependencies/_config.js
+++ b/test/runtime/samples/attribute-dynamic-no-dependencies/_config.js
@@ -1,5 +1,5 @@
export default {
html: `
- `
+ `,
};
diff --git a/test/runtime/samples/attribute-false/_config.js b/test/runtime/samples/attribute-false/_config.js
index 632d4ac1c2..9fd08a2a48 100644
--- a/test/runtime/samples/attribute-false/_config.js
+++ b/test/runtime/samples/attribute-false/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `
`
+ html: `
`,
};
diff --git a/test/runtime/samples/attribute-null-classnames-no-style/_config.js b/test/runtime/samples/attribute-null-classnames-no-style/_config.js
index e90d81a60f..917cf565c0 100644
--- a/test/runtime/samples/attribute-null-classnames-no-style/_config.js
+++ b/test/runtime/samples/attribute-null-classnames-no-style/_config.js
@@ -1,7 +1,7 @@
export default {
props: {
testName1: "test1",
- testName2: "test2"
+ testName2: "test2",
},
html: `
`,
diff --git a/test/runtime/samples/attribute-null-classnames-with-style/_config.js b/test/runtime/samples/attribute-null-classnames-with-style/_config.js
index 20e6d4c7be..5762f628fb 100644
--- a/test/runtime/samples/attribute-null-classnames-with-style/_config.js
+++ b/test/runtime/samples/attribute-null-classnames-with-style/_config.js
@@ -1,7 +1,7 @@
export default {
props: {
testName1: "test1",
- testName2: "test2"
+ testName2: "test2",
},
html: `
`,
diff --git a/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js b/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js
index e90d81a60f..917cf565c0 100644
--- a/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js
+++ b/test/runtime/samples/attribute-null-func-classnames-no-style/_config.js
@@ -1,7 +1,7 @@
export default {
props: {
testName1: "test1",
- testName2: "test2"
+ testName2: "test2",
},
html: `
`,
diff --git a/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js b/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js
index 20e6d4c7be..5762f628fb 100644
--- a/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js
+++ b/test/runtime/samples/attribute-null-func-classnames-with-style/_config.js
@@ -1,7 +1,7 @@
export default {
props: {
testName1: "test1",
- testName2: "test2"
+ testName2: "test2",
},
html: `
`,
diff --git a/test/runtime/samples/attribute-null/_config.js b/test/runtime/samples/attribute-null/_config.js
index 36955050a0..ae2f0a8af6 100644
--- a/test/runtime/samples/attribute-null/_config.js
+++ b/test/runtime/samples/attribute-null/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `
`
+ html: `
`,
};
diff --git a/test/runtime/samples/attribute-prefer-expression/_config.js b/test/runtime/samples/attribute-prefer-expression/_config.js
index 2388ff35df..29fcbc7f13 100644
--- a/test/runtime/samples/attribute-prefer-expression/_config.js
+++ b/test/runtime/samples/attribute-prefer-expression/_config.js
@@ -2,7 +2,7 @@ export default {
skip_if_ssr: true,
props: {
- foo: false
+ foo: false,
},
test({ assert, component, target }) {
@@ -15,5 +15,5 @@ export default {
assert.ok(!inputs[0].checked);
assert.ok(inputs[1].checked);
- }
+ },
};
diff --git a/test/runtime/samples/attribute-undefined/_config.js b/test/runtime/samples/attribute-undefined/_config.js
index 36955050a0..ae2f0a8af6 100644
--- a/test/runtime/samples/attribute-undefined/_config.js
+++ b/test/runtime/samples/attribute-undefined/_config.js
@@ -1,3 +1,3 @@
export default {
- html: `
`
+ html: `
`,
};
diff --git a/test/runtime/samples/await-with-update-2/Component.svelte b/test/runtime/samples/await-with-update-2/Component.svelte
deleted file mode 100644
index 1301db3f99..0000000000
--- a/test/runtime/samples/await-with-update-2/Component.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-count: {count}
-value: {value}
\ No newline at end of file
diff --git a/test/runtime/samples/await-with-update-2/_config.js b/test/runtime/samples/await-with-update-2/_config.js
deleted file mode 100644
index 613f2b3255..0000000000
--- a/test/runtime/samples/await-with-update-2/_config.js
+++ /dev/null
@@ -1,64 +0,0 @@
-export default {
- props: {
- thePromise: new Promise((_) => {}),
- count: 0
- },
-
- html: `
-
- `,
-
- async test({ assert, component, target }) {
- await (component.thePromise = Promise.resolve({ value: "success", Component: component.Component }));
-
- assert.htmlEqual(
- target.innerHTML,
- `
- Resolved:
-
count: 0
-
value: success
-
- `
- );
-
- component.count = 5;
-
- assert.htmlEqual(
- target.innerHTML,
- `
- Resolved:
-
count: 5
-
value: success
-
- `
- );
-
- try {
- await (component.thePromise = Promise.reject({ value: "failure", Component: component.Component }));
- } catch (error) {
- // ignore
- }
-
- assert.htmlEqual(
- target.innerHTML,
- `
- Rejected:
-
count: 5
-
value: failure
-
- `
- );
-
- component.count = 10;
-
- assert.htmlEqual(
- target.innerHTML,
- `
- Rejected:
-
count: 10
-
value: failure
-
- `
- );
- }
-};
diff --git a/test/runtime/samples/await-with-update-2/main.svelte b/test/runtime/samples/await-with-update-2/main.svelte
deleted file mode 100644
index b29c875f92..0000000000
--- a/test/runtime/samples/await-with-update-2/main.svelte
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- {#await thePromise}
-
loading...
- {:then { value: theValue, Component }}
- Resolved:
- {:catch { value: theError, Component } }
- Rejected:
- {/await}
-
\ No newline at end of file
diff --git a/test/runtime/samples/await-with-update/Component.svelte b/test/runtime/samples/await-with-update/Component.svelte
deleted file mode 100644
index 5f13c80e65..0000000000
--- a/test/runtime/samples/await-with-update/Component.svelte
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-count: {count}
\ No newline at end of file
diff --git a/test/runtime/samples/await-with-update/_config.js b/test/runtime/samples/await-with-update/_config.js
deleted file mode 100644
index 08bf12b89e..0000000000
--- a/test/runtime/samples/await-with-update/_config.js
+++ /dev/null
@@ -1,60 +0,0 @@
-export default {
- props: {
- thePromise: new Promise((_) => {}),
- count: 0
- },
-
- html: `
-
- `,
-
- async test({ assert, component, target }) {
- await (component.thePromise = Promise.resolve(component.Component));
-
- assert.htmlEqual(
- target.innerHTML,
- `
-
- `
- );
-
- component.count = 5;
-
- assert.htmlEqual(
- target.innerHTML,
- `
-
- `
- );
-
- try {
- await (component.thePromise = Promise.reject(component.Component));
- } catch (error) {
- // ignore
- }
-
- assert.htmlEqual(
- target.innerHTML,
- `
-
- `
- );
-
- component.count = 10;
-
- assert.htmlEqual(
- target.innerHTML,
- `
-
- `
- );
- }
-};
diff --git a/test/runtime/samples/await-with-update/main.svelte b/test/runtime/samples/await-with-update/main.svelte
deleted file mode 100644
index 51c5b76a21..0000000000
--- a/test/runtime/samples/await-with-update/main.svelte
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- {#await thePromise}
-
loading...
- {:then theValue}
- Resolved:
- {:catch theError}
- Rejected:
- {/await}
-
\ No newline at end of file
diff --git a/test/runtime/samples/await-without-catch/_config.js b/test/runtime/samples/await-without-catch/_config.js
deleted file mode 100644
index 2030ed7949..0000000000
--- a/test/runtime/samples/await-without-catch/_config.js
+++ /dev/null
@@ -1,44 +0,0 @@
-let fulfil;
-
-let promise = new Promise(f => {
- fulfil = f;
-});
-
-export default {
- props: {
- promise
- },
-
- html: `
- loading...
- `,
-
- test({ assert, component, target }) {
- fulfil(42);
-
- return promise
- .then(() => {
- assert.htmlEqual(target.innerHTML, `
- loaded
- `);
-
- let reject;
-
- promise = new Promise((f, r) => {
- reject = r;
- });
-
- component.promise = promise;
-
- assert.htmlEqual(target.innerHTML, `
- loading...
- `);
-
- reject(new Error('this error should be thrown'));
- return promise;
- })
- .catch((err) => {
- assert.equal(err.message, 'this error should be thrown');
- });
- }
-};
\ No newline at end of file
diff --git a/test/runtime/samples/await-without-catch/main.svelte b/test/runtime/samples/await-without-catch/main.svelte
deleted file mode 100644
index f528a8bf69..0000000000
--- a/test/runtime/samples/await-without-catch/main.svelte
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-{#await promise}
- loading...
-{:then value}
- loaded
-{/await}
\ No newline at end of file
diff --git a/test/runtime/samples/binding-contenteditable-html-initial/_config.js b/test/runtime/samples/binding-contenteditable-html-initial/_config.js
index 4c30a3231a..9eac2c9b17 100644
--- a/test/runtime/samples/binding-contenteditable-html-initial/_config.js
+++ b/test/runtime/samples/binding-contenteditable-html-initial/_config.js
@@ -36,5 +36,5 @@ export default {
goodbye
hello goodbye
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-contenteditable-html/_config.js b/test/runtime/samples/binding-contenteditable-html/_config.js
index 639572faea..ceb6a75c70 100644
--- a/test/runtime/samples/binding-contenteditable-html/_config.js
+++ b/test/runtime/samples/binding-contenteditable-html/_config.js
@@ -1,6 +1,6 @@
export default {
props: {
- name: 'world '
+ name: 'world ',
},
html: `
@@ -34,5 +34,5 @@ export default {
goodbye
hello goodbye
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-contenteditable-text-initial/_config.js b/test/runtime/samples/binding-contenteditable-text-initial/_config.js
index d5f331bb7a..4899f30f12 100644
--- a/test/runtime/samples/binding-contenteditable-text-initial/_config.js
+++ b/test/runtime/samples/binding-contenteditable-text-initial/_config.js
@@ -30,5 +30,5 @@ export default {
goodbye
hello goodbye
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-contenteditable-text/_config.js b/test/runtime/samples/binding-contenteditable-text/_config.js
index 89f3968258..9f8645724d 100644
--- a/test/runtime/samples/binding-contenteditable-text/_config.js
+++ b/test/runtime/samples/binding-contenteditable-text/_config.js
@@ -1,6 +1,6 @@
export default {
props: {
- name: 'world'
+ name: 'world',
},
html: `
@@ -28,5 +28,5 @@ export default {
goodbye
hello goodbye
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-input-checkbox-indeterminate/_config.js b/test/runtime/samples/binding-input-checkbox-indeterminate/_config.js
index 9d099feb0a..2e3a1c296f 100644
--- a/test/runtime/samples/binding-input-checkbox-indeterminate/_config.js
+++ b/test/runtime/samples/binding-input-checkbox-indeterminate/_config.js
@@ -2,7 +2,7 @@ export default {
skip_if_ssr: true,
props: {
- indeterminate: true
+ indeterminate: true,
},
html: `
@@ -38,5 +38,5 @@ export default {
checked? true
indeterminate? true
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-input-checkbox-with-event-in-each/_config.js b/test/runtime/samples/binding-input-checkbox-with-event-in-each/_config.js
index 9e6f915dd0..b502ed40af 100644
--- a/test/runtime/samples/binding-input-checkbox-with-event-in-each/_config.js
+++ b/test/runtime/samples/binding-input-checkbox-with-event-in-each/_config.js
@@ -3,13 +3,13 @@ export default {
cats: [
{
name: "cat 0",
- checked: false
+ checked: false,
},
{
name: "cat 1",
- checked: false
- }
- ]
+ checked: false,
+ },
+ ],
},
html: `
@@ -22,7 +22,7 @@ export default {
const newCats = cats.slice();
newCats.push({
name: "cat " + cats.length,
- checked: false
+ checked: false,
});
component.cats = newCats;
diff --git a/test/runtime/samples/binding-input-group-duplicate-value/_config.js b/test/runtime/samples/binding-input-group-duplicate-value/_config.js
deleted file mode 100644
index 7f50ad6dce..0000000000
--- a/test/runtime/samples/binding-input-group-duplicate-value/_config.js
+++ /dev/null
@@ -1,81 +0,0 @@
-export default {
- html: `
- Checked:
-
-
-
- a
- b
- c
- d
-
-
-
- a
- b
- c
- d
- `,
-
- async test({ assert, component, target, window }) {
- const inputs = target.querySelectorAll("input");
- const p = target.querySelector("p");
-
- assert.equal(inputs[0].checked, false);
- assert.equal(inputs[1].checked, false);
- assert.equal(inputs[2].checked, false);
- assert.equal(inputs[3].checked, false);
-
- assert.equal(inputs[4].checked, false);
- assert.equal(inputs[5].checked, false);
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, false);
-
- const event = new window.Event("change");
-
- inputs[0].checked = true;
- await inputs[0].dispatchEvent(event);
-
- assert.htmlEqual(p.innerHTML, `Checked: a`);
-
- assert.equal(inputs[0].checked, true);
- assert.equal(inputs[1].checked, false);
- assert.equal(inputs[2].checked, false);
- assert.equal(inputs[3].checked, false);
-
- assert.equal(inputs[4].checked, true);
- assert.equal(inputs[5].checked, false);
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, false);
-
- inputs[3].checked = true;
- await inputs[3].dispatchEvent(event);
-
- assert.htmlEqual(p.innerHTML, `Checked: a,d`);
-
- assert.equal(inputs[0].checked, true);
- assert.equal(inputs[1].checked, false);
- assert.equal(inputs[2].checked, false);
- assert.equal(inputs[3].checked, true);
-
- assert.equal(inputs[4].checked, true);
- assert.equal(inputs[5].checked, false);
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, true);
-
- inputs[4].checked = false;
- await inputs[4].dispatchEvent(event);
-
- assert.htmlEqual(p.innerHTML, `Checked: d`);
-
- assert.equal(inputs[0].checked, false);
- assert.equal(inputs[1].checked, false);
- assert.equal(inputs[2].checked, false);
- assert.equal(inputs[3].checked, true);
-
- assert.equal(inputs[4].checked, false);
- assert.equal(inputs[5].checked, false);
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, true);
- }
-};
diff --git a/test/runtime/samples/binding-input-group-duplicate-value/main.svelte b/test/runtime/samples/binding-input-group-duplicate-value/main.svelte
deleted file mode 100644
index 153e559d23..0000000000
--- a/test/runtime/samples/binding-input-group-duplicate-value/main.svelte
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-Checked: {foo}
-
-
-
- a
- b
- c
- d
-
-
-
- a
- b
- c
- d
\ No newline at end of file
diff --git a/test/runtime/samples/binding-input-group-each-1/_config.js b/test/runtime/samples/binding-input-group-each-1/_config.js
deleted file mode 100644
index 92010296dc..0000000000
--- a/test/runtime/samples/binding-input-group-each-1/_config.js
+++ /dev/null
@@ -1,275 +0,0 @@
-const values = [
- { name: 'Alpha' },
- { name: 'Beta' },
- { name: 'Gamma' }
-];
-
-const selected_array = [
- [values[1]],
- [],
- [values[2]]
-];
-
-export default {
- props: {
- values,
- selected_array
- },
-
- html: `
-
-
-
- `,
-
- async test({ assert, component, target, window }) {
- const inputs = target.querySelectorAll('input');
- assert.equal(inputs[0].checked, false);
- assert.equal(inputs[1].checked, true);
- assert.equal(inputs[2].checked, false);
- assert.equal(inputs[3].checked, false);
- assert.equal(inputs[4].checked, false);
- assert.equal(inputs[5].checked, false);
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, false);
- assert.equal(inputs[8].checked, true);
-
- const event = new window.Event('change');
-
- inputs[0].checked = true;
- await inputs[0].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
-
-
-
- `);
- inputs[3].checked = true;
- await inputs[3].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
-
-
-
- `);
-
- inputs[8].checked = false;
- await inputs[8].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
-
-
-
- `);
-
- component.selected_array = [[values[1], values[2]], [values[2]]];
-
- assert.equal(inputs[0].checked, false);
- assert.equal(inputs[1].checked, true);
- assert.equal(inputs[2].checked, true);
- assert.equal(inputs[3].checked, false);
- assert.equal(inputs[4].checked, false);
- assert.equal(inputs[5].checked, true);
-
- assert.htmlEqual(target.innerHTML, `
-
-
- `);
- }
-};
diff --git a/test/runtime/samples/binding-input-group-each-1/main.svelte b/test/runtime/samples/binding-input-group-each-1/main.svelte
deleted file mode 100644
index 5ed255c83a..0000000000
--- a/test/runtime/samples/binding-input-group-each-1/main.svelte
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-{#each selected_array as selected}
-
- {#each values as value}
-
- {value.name}
-
- {/each}
-
{selected.map(v => v.name).join(', ')}
-
-{/each}
diff --git a/test/runtime/samples/binding-input-group-each-2/_config.js b/test/runtime/samples/binding-input-group-each-2/_config.js
deleted file mode 100644
index 78d692d979..0000000000
--- a/test/runtime/samples/binding-input-group-each-2/_config.js
+++ /dev/null
@@ -1,59 +0,0 @@
-export default {
- html: `
-
- 1
-
-
- 2
-
-
- 3
-
-
- 1, 2, 3
`,
-
- async test({ assert, component, target, window }) {
- const inputs = target.querySelectorAll('input');
- assert.equal(inputs[0].checked, true);
- assert.equal(inputs[1].checked, true);
- assert.equal(inputs[2].checked, true);
-
- const event = new window.Event('change');
-
- inputs[0].checked = false;
- await inputs[0].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
-
- 1
-
-
- 2
-
-
- 3
-
-
- 2, 3
- `);
-
- component.selected = [[1, 3]];
- assert.equal(inputs[0].checked, true);
- assert.equal(inputs[1].checked, false);
- assert.equal(inputs[2].checked, true);
-
- assert.htmlEqual(target.innerHTML, `
-
- 1
-
-
- 2
-
-
- 3
-
-
- 1, 3
- `);
- }
-};
diff --git a/test/runtime/samples/binding-input-group-each-2/main.svelte b/test/runtime/samples/binding-input-group-each-2/main.svelte
deleted file mode 100644
index 46f7e9e698..0000000000
--- a/test/runtime/samples/binding-input-group-each-2/main.svelte
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-{#each options as value}
-
-
- {value}
-
-{/each}
-
-{selected[0].join(', ')}
\ No newline at end of file
diff --git a/test/runtime/samples/binding-input-group-each-3/_config.js b/test/runtime/samples/binding-input-group-each-3/_config.js
deleted file mode 100644
index 92010296dc..0000000000
--- a/test/runtime/samples/binding-input-group-each-3/_config.js
+++ /dev/null
@@ -1,275 +0,0 @@
-const values = [
- { name: 'Alpha' },
- { name: 'Beta' },
- { name: 'Gamma' }
-];
-
-const selected_array = [
- [values[1]],
- [],
- [values[2]]
-];
-
-export default {
- props: {
- values,
- selected_array
- },
-
- html: `
-
-
-
- `,
-
- async test({ assert, component, target, window }) {
- const inputs = target.querySelectorAll('input');
- assert.equal(inputs[0].checked, false);
- assert.equal(inputs[1].checked, true);
- assert.equal(inputs[2].checked, false);
- assert.equal(inputs[3].checked, false);
- assert.equal(inputs[4].checked, false);
- assert.equal(inputs[5].checked, false);
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, false);
- assert.equal(inputs[8].checked, true);
-
- const event = new window.Event('change');
-
- inputs[0].checked = true;
- await inputs[0].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
-
-
-
- `);
- inputs[3].checked = true;
- await inputs[3].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
-
-
-
- `);
-
- inputs[8].checked = false;
- await inputs[8].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
-
-
-
- `);
-
- component.selected_array = [[values[1], values[2]], [values[2]]];
-
- assert.equal(inputs[0].checked, false);
- assert.equal(inputs[1].checked, true);
- assert.equal(inputs[2].checked, true);
- assert.equal(inputs[3].checked, false);
- assert.equal(inputs[4].checked, false);
- assert.equal(inputs[5].checked, true);
-
- assert.htmlEqual(target.innerHTML, `
-
-
- `);
- }
-};
diff --git a/test/runtime/samples/binding-input-group-each-3/main.svelte b/test/runtime/samples/binding-input-group-each-3/main.svelte
deleted file mode 100644
index 42a7a1c4e9..0000000000
--- a/test/runtime/samples/binding-input-group-each-3/main.svelte
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-{#each selected_array as _, index}
-
- {#each values as value}
-
- {value.name}
-
- {/each}
-
{selected_array[index].map(v => v.name).join(', ')}
-
-{/each}
diff --git a/test/runtime/samples/binding-input-group-each-4/_config.js b/test/runtime/samples/binding-input-group-each-4/_config.js
deleted file mode 100644
index f1168858b0..0000000000
--- a/test/runtime/samples/binding-input-group-each-4/_config.js
+++ /dev/null
@@ -1,153 +0,0 @@
-export default {
- html: `
- 1
- 2
- 3
- 1
- 1
- 2
- 3
- 2
- 1
- 2
- 3
-
- 1
- 2
- 3
- 3
- `,
-
- async test({ assert, component, target, window }) {
- const inputs = target.querySelectorAll('input');
- assert.equal(inputs[0].checked, true);
- assert.equal(inputs[1].checked, false);
- assert.equal(inputs[2].checked, false);
-
- assert.equal(inputs[3].checked, false);
- assert.equal(inputs[4].checked, true);
- assert.equal(inputs[5].checked, false);
-
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, false);
- assert.equal(inputs[8].checked, false);
-
- assert.equal(inputs[9].checked, false);
- assert.equal(inputs[10].checked, false);
- assert.equal(inputs[11].checked, true);
-
- const event = new window.Event('change');
-
- inputs[2].checked = true;
- await inputs[2].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
- 1
- 2
- 3
- 1, 3
- 1
- 2
- 3
- 2
- 1
- 2
- 3
-
- 1
- 2
- 3
- 3
- `);
-
- inputs[9].checked = true;
- await inputs[9].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
- 1
- 2
- 3
- 1, 3
- 1
- 2
- 3
- 2
- 1
- 2
- 3
-
- 1
- 2
- 3
- 1, 3
- `);
-
- inputs[4].checked = false;
- await inputs[4].dispatchEvent(event);
- inputs[5].checked = true;
- await inputs[5].dispatchEvent(event);
- inputs[6].checked = true;
- await inputs[6].dispatchEvent(event);
- inputs[7].checked = true;
- await inputs[7].dispatchEvent(event);
- inputs[11].checked = false;
- await inputs[11].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
- 1
- 2
- 3
- 1, 3
- 1
- 2
- 3
- 3
- 1
- 2
- 3
- 1, 2
- 1
- 2
- 3
- 1
- `);
-
- component.selected_array_1 = [[3], [1]];
- component.selected_array_2 = [[], [2]];
-
- assert.equal(inputs[0].checked, false);
- assert.equal(inputs[1].checked, false);
- assert.equal(inputs[2].checked, true);
-
- assert.equal(inputs[3].checked, true);
- assert.equal(inputs[4].checked, false);
- assert.equal(inputs[5].checked, false);
-
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, false);
- assert.equal(inputs[8].checked, false);
-
- assert.equal(inputs[9].checked, false);
- assert.equal(inputs[10].checked, true);
- assert.equal(inputs[11].checked, false);
-
- assert.htmlEqual(target.innerHTML, `
- 1
- 2
- 3
- 3
- 1
- 2
- 3
- 1
- 1
- 2
- 3
-
- 1
- 2
- 3
- 2
- `);
- }
-};
diff --git a/test/runtime/samples/binding-input-group-each-4/main.svelte b/test/runtime/samples/binding-input-group-each-4/main.svelte
deleted file mode 100644
index 0bbf5ea763..0000000000
--- a/test/runtime/samples/binding-input-group-each-4/main.svelte
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-{#each selected_array_1 as selected}
- {#each options as value}
-
-
- {value}
-
- {/each}
- {selected.join(', ')}
-{/each}
-
-{#each selected_array_2 as selected}
- {#each options as value}
-
-
- {value}
-
- {/each}
- {selected.join(', ')}
-{/each}
\ No newline at end of file
diff --git a/test/runtime/samples/binding-input-group-each-5/_config.js b/test/runtime/samples/binding-input-group-each-5/_config.js
deleted file mode 100644
index 579225c627..0000000000
--- a/test/runtime/samples/binding-input-group-each-5/_config.js
+++ /dev/null
@@ -1,160 +0,0 @@
-export default {
- html: `
- 1
- 2
- 3
- 1
- 1
- 2
- 3
- 1, 2, 3
- 1
- 2
- 3
- 2
- 1
- 2
- 3
- 1
- `,
-
- async test({ assert, component, target, window }) {
- const inputs = target.querySelectorAll('input');
- assert.equal(inputs[0].checked, true);
- assert.equal(inputs[1].checked, false);
- assert.equal(inputs[2].checked, false);
-
- assert.equal(inputs[3].checked, true);
- assert.equal(inputs[4].checked, true);
- assert.equal(inputs[5].checked, true);
-
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, true);
- assert.equal(inputs[8].checked, false);
-
- assert.equal(inputs[9].checked, true);
- assert.equal(inputs[10].checked, false);
- assert.equal(inputs[11].checked, false);
-
- const event = new window.Event('change');
-
- inputs[2].checked = true;
- await inputs[2].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
- 1
- 2
- 3
- 1, 3
- 1
- 2
- 3
- 1, 2, 3
- 1
- 2
- 3
- 2
- 1
- 2
- 3
- 1
- `);
-
- inputs[8].checked = true;
- await inputs[8].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
- 1
- 2
- 3
- 1, 3
- 1
- 2
- 3
- 1, 2, 3
- 1
- 2
- 3
- 2, 3
- 1
- 2
- 3
- 1
- `);
-
- component.selected_index = [1, 1];
-
- assert.htmlEqual(target.innerHTML, `
- 1
- 2
- 3
- 1, 2, 3
- 1
- 2
- 3
- 1, 2, 3
- 1
- 2
- 3
- 1
- 1
- 2
- 3
- 1
- `);
-
- assert.equal(inputs[0].checked, true);
- assert.equal(inputs[1].checked, true);
- assert.equal(inputs[2].checked, true);
-
- assert.equal(inputs[3].checked, true);
- assert.equal(inputs[4].checked, true);
- assert.equal(inputs[5].checked, true);
-
- assert.equal(inputs[6].checked, true);
- assert.equal(inputs[7].checked, false);
- assert.equal(inputs[8].checked, false);
-
- assert.equal(inputs[9].checked, true);
- assert.equal(inputs[10].checked, false);
- assert.equal(inputs[11].checked, false);
-
- inputs[5].checked = false;
- await inputs[5].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
- 1
- 2
- 3
- 1, 2
- 1
- 2
- 3
- 1, 2
- 1
- 2
- 3
- 1
- 1
- 2
- 3
- 1
- `);
-
- assert.equal(inputs[0].checked, true);
- assert.equal(inputs[1].checked, true);
- assert.equal(inputs[2].checked, false);
-
- assert.equal(inputs[3].checked, true);
- assert.equal(inputs[4].checked, true);
- assert.equal(inputs[5].checked, false);
-
- assert.equal(inputs[6].checked, true);
- assert.equal(inputs[7].checked, false);
- assert.equal(inputs[8].checked, false);
-
- assert.equal(inputs[9].checked, true);
- assert.equal(inputs[10].checked, false);
- assert.equal(inputs[11].checked, false);
- }
-};
diff --git a/test/runtime/samples/binding-input-group-each-5/main.svelte b/test/runtime/samples/binding-input-group-each-5/main.svelte
deleted file mode 100644
index 93bdce6510..0000000000
--- a/test/runtime/samples/binding-input-group-each-5/main.svelte
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-{#each selected_array as selected}
- {#each selected_index as index}
- {#each options as value}
-
-
- {value}
-
- {/each}
- {selected[index].join(', ')}
- {/each}
-{/each}
diff --git a/test/runtime/samples/binding-input-group-each-6/_config.js b/test/runtime/samples/binding-input-group-each-6/_config.js
deleted file mode 100644
index 9eb251bf5d..0000000000
--- a/test/runtime/samples/binding-input-group-each-6/_config.js
+++ /dev/null
@@ -1,87 +0,0 @@
-export default {
- html: `
- x
- y
- z
-
- x
- y
- z
-
- x
- y
- z
-
- `,
-
- async test({ assert, component, target, window }) {
- const inputs = target.querySelectorAll('input');
- assert.equal(inputs[0].checked, false);
- assert.equal(inputs[1].checked, false);
- assert.equal(inputs[2].checked, false);
-
- assert.equal(inputs[3].checked, false);
- assert.equal(inputs[4].checked, false);
- assert.equal(inputs[5].checked, false);
-
- assert.equal(inputs[6].checked, false);
- assert.equal(inputs[7].checked, false);
- assert.equal(inputs[8].checked, false);
-
- const event = new window.Event('change');
-
- inputs[2].checked = true;
- await inputs[2].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
- x
- y
- z
- z
- x
- y
- z
-
- x
- y
- z
-
- `);
-
- inputs[4].checked = true;
- await inputs[4].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
- x
- y
- z
- z
- x
- y
- z
- y
- x
- y
- z
-
- `);
-
- inputs[5].checked = true;
- await inputs[5].dispatchEvent(event);
-
- assert.htmlEqual(target.innerHTML, `
- x
- y
- z
- z
- x
- y
- z
- y, z
- x
- y
- z
-
- `);
- }
-};
diff --git a/test/runtime/samples/binding-input-group-each-6/main.svelte b/test/runtime/samples/binding-input-group-each-6/main.svelte
deleted file mode 100644
index 85be939e8a..0000000000
--- a/test/runtime/samples/binding-input-group-each-6/main.svelte
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-{#each Object.keys(list) as key}
- {#each values as value}
-
-
- {value}
-
- {/each}
- {list[key].join(', ')}
-{/each}
diff --git a/test/runtime/samples/binding-input-number-2/_config.js b/test/runtime/samples/binding-input-number-2/_config.js
index 5daf50fd04..a3510eb757 100644
--- a/test/runtime/samples/binding-input-number-2/_config.js
+++ b/test/runtime/samples/binding-input-number-2/_config.js
@@ -27,5 +27,5 @@ export default {
component.value = 1;
assert.equal(component.value, 1);
assert.equal(input.value, "1");
- }
+ },
};
diff --git a/test/runtime/samples/binding-input-number/_config.js b/test/runtime/samples/binding-input-number/_config.js
index 3c5919bc64..869b9f9896 100644
--- a/test/runtime/samples/binding-input-number/_config.js
+++ b/test/runtime/samples/binding-input-number/_config.js
@@ -1,6 +1,6 @@
export default {
props: {
- count: 42
+ count: 42,
},
html: `
@@ -44,5 +44,5 @@ export default {
undefined undefined
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-input-range-change-with-max/_config.js b/test/runtime/samples/binding-input-range-change-with-max/_config.js
index dc3cf4ce28..1fda90d83c 100644
--- a/test/runtime/samples/binding-input-range-change-with-max/_config.js
+++ b/test/runtime/samples/binding-input-range-change-with-max/_config.js
@@ -29,5 +29,5 @@ export default {
20 of 20
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-input-range-change/_config.js b/test/runtime/samples/binding-input-range-change/_config.js
index f6ec2d9c53..62e9562770 100644
--- a/test/runtime/samples/binding-input-range-change/_config.js
+++ b/test/runtime/samples/binding-input-range-change/_config.js
@@ -1,6 +1,6 @@
export default {
props: {
- count: 42
+ count: 42,
},
html: `
@@ -34,5 +34,5 @@ export default {
number 44
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-input-range/_config.js b/test/runtime/samples/binding-input-range/_config.js
index dc6178e088..4c3d37a667 100644
--- a/test/runtime/samples/binding-input-range/_config.js
+++ b/test/runtime/samples/binding-input-range/_config.js
@@ -1,6 +1,6 @@
export default {
props: {
- count: 42
+ count: 42,
},
html: `
@@ -34,5 +34,5 @@ export default {
number 44
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-input-text-contextual-deconflicted/_config.js b/test/runtime/samples/binding-input-text-contextual-deconflicted/_config.js
index de4d6325b0..28cffdfa57 100644
--- a/test/runtime/samples/binding-input-text-contextual-deconflicted/_config.js
+++ b/test/runtime/samples/binding-input-text-contextual-deconflicted/_config.js
@@ -1,7 +1,7 @@
export default {
props: {
foo: 'a',
- items: ['x']
+ items: ['x'],
},
html: `
@@ -32,5 +32,5 @@ export default {
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-input-text-contextual-reactive/_config.js b/test/runtime/samples/binding-input-text-contextual-reactive/_config.js
index a1584c18b8..6fdfc4be52 100644
--- a/test/runtime/samples/binding-input-text-contextual-reactive/_config.js
+++ b/test/runtime/samples/binding-input-text-contextual-reactive/_config.js
@@ -121,5 +121,5 @@ export default {
done:one / done:two / remaining:four
`);
- }
+ },
};
diff --git a/test/runtime/samples/binding-input-text-contextual/_config.js b/test/runtime/samples/binding-input-text-contextual/_config.js
index 1c66ea7ff5..bb7f16c8bb 100644
--- a/test/runtime/samples/binding-input-text-contextual/_config.js
+++ b/test/runtime/samples/binding-input-text-contextual/_config.js
@@ -1,6 +1,6 @@
export default {
props: {
- items: ['one', 'two', 'three']
+ items: ['one', 'two', 'three'],
},
html: `
@@ -65,5 +65,5 @@ export default {
five