From 97ae7dd4a9166b16f9335736b207575008112a51 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Thu, 10 Jan 2019 23:04:33 -0500 Subject: [PATCH] update tests --- .../action-custom-event-handler/expected.js | 9 ++------ test/js/samples/action/expected.js | 9 ++------ test/js/samples/bind-width-height/expected.js | 9 ++------ .../expected.js | 8 ++----- .../component-static-array/expected.js | 10 +++++---- .../component-static-immutable/expected.js | 10 +++++---- .../component-static-immutable2/expected.js | 10 +++++---- test/js/samples/component-static/expected.js | 10 +++++---- .../samples/computed-collapsed-if/expected.js | 2 +- test/js/samples/css-media-query/expected.js | 9 ++------ .../css-shadow-dom-keyframes/expected.js | 9 ++------ test/js/samples/debug-empty/expected.js | 8 ++----- .../debug-foo-bar-baz-things/expected.js | 8 ++----- test/js/samples/debug-foo/expected.js | 8 ++----- .../samples/deconflict-builtins/expected.js | 8 ++----- .../js/samples/deconflict-globals/expected.js | 2 +- .../expected.js | 8 ++----- test/js/samples/do-use-dataset/expected.js | 8 ++----- .../dont-use-dataset-in-legacy/expected.js | 8 ++----- .../dont-use-dataset-in-svg/expected.js | 8 ++----- test/js/samples/dynamic-import/expected.js | 10 +++++---- .../each-block-changed-check/expected.js | 8 ++----- .../each-block-keyed-animated/expected.js | 22 ++++++++----------- test/js/samples/each-block-keyed/expected.js | 18 ++++++--------- .../event-handler-no-passive/expected.js | 9 ++------ test/js/samples/event-modifiers/expected.js | 9 ++------ .../js/samples/head-no-whitespace/expected.js | 9 ++------ test/js/samples/hoisted-const/expected.js | 9 ++------ .../js/samples/if-block-no-update/expected.js | 14 +++++------- test/js/samples/if-block-simple/expected.js | 8 ++----- .../expected.js | 8 ++----- .../inline-style-optimized-url/expected.js | 8 ++----- .../inline-style-optimized/expected.js | 8 ++----- .../inline-style-unoptimized/expected.js | 8 ++----- test/js/samples/input-files/expected.js | 9 ++------ test/js/samples/input-range/expected.js | 9 ++------ .../input-without-blowback-guard/expected.js | 9 ++------ .../expected.js | 8 ++----- .../expected.js | 8 ++----- .../expected.js | 8 ++----- .../expected.js | 8 ++----- test/js/samples/legacy-input-type/expected.js | 9 ++------ test/js/samples/media-bindings/expected.js | 9 ++------ .../non-imported-component/expected.js | 12 ++++++---- .../samples/select-dynamic-value/expected.js | 9 ++------ test/js/samples/setup-method/expected.js | 2 +- test/js/samples/svg-title/expected.js | 9 ++------ test/js/samples/title/expected.js | 2 +- .../use-elements-as-anchors/expected.js | 8 ++----- .../samples/window-binding-scroll/expected.js | 8 ++----- test/runtime/index.js | 2 +- 51 files changed, 139 insertions(+), 299 deletions(-) diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js index d076e11734..ce583e483f 100644 --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var button, foo_action, current, mounted; + var button, foo_action, current; return { c() { @@ -13,15 +13,10 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, button, anchor); foo_action = foo.call(null, button, ctx.foo_function) || {}; - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index 3659cb4d4a..25e06c719a 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var a, link_action, current, mounted; + var a, link_action, current; return { c() { @@ -14,15 +14,10 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, a, anchor); link_action = link.call(null, a) || {}; - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js index 2481f44d15..918627fe8e 100644 --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var div, div_resize_listener, current, mounted; + var div, div_resize_listener, current; return { c() { @@ -14,15 +14,10 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); div_resize_listener = addResizeListener(div, ctx.div_resize_handler.bind(div)); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index af3b94df81..a15496fce5 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -9,7 +9,7 @@ function add_css() { } function create_fragment($$, ctx) { - var p, text, current, mounted; + var p, text, current; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, p, anchor); append(p, text); - current = mounted = true; }, p(changed, ctx) { @@ -30,10 +29,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index f4a8716ec5..ab3dbbc4f6 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var current, mounted; + var current; var nested = new ctx.Nested({ props: { foo: [1, 2, 3] } }); @@ -13,13 +13,15 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(nested, target, anchor); - current = mounted = true; }, p: noop, - i(target, anchor) { - if (!mounted) this.m(target, anchor); + i() { + if (current) return; + nested.$$.fragment.i(); + + current = true; }, o() { diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index 274526b518..0e8d67ccea 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var current, mounted; + var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); @@ -13,13 +13,15 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(nested, target, anchor); - current = mounted = true; }, p: noop, - i(target, anchor) { - if (!mounted) this.m(target, anchor); + i() { + if (current) return; + nested.$$.fragment.i(); + + current = true; }, o() { diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index 274526b518..0e8d67ccea 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var current, mounted; + var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); @@ -13,13 +13,15 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(nested, target, anchor); - current = mounted = true; }, p: noop, - i(target, anchor) { - if (!mounted) this.m(target, anchor); + i() { + if (current) return; + nested.$$.fragment.i(); + + current = true; }, o() { diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index 3ecb5965f9..be7357c866 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var current, mounted; + var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); @@ -13,13 +13,15 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(nested, target, anchor); - current = mounted = true; }, p: noop, - i(target, anchor) { - if (!mounted) this.m(target, anchor); + i() { + if (current) return; + nested.$$.fragment.i(); + + current = true; }, o() { diff --git a/test/js/samples/computed-collapsed-if/expected.js b/test/js/samples/computed-collapsed-if/expected.js index 8dac94bdee..91483a1998 100644 --- a/test/js/samples/computed-collapsed-if/expected.js +++ b/test/js/samples/computed-collapsed-if/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var current, mounted; + var current; return { c: noop, diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index 5890b84768..90ed9f4b57 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -9,7 +9,7 @@ function add_css() { } function create_fragment($$, ctx) { - var div, current, mounted; + var div, current; return { c() { @@ -19,15 +19,10 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index 1e531f35ab..9a031dc150 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -2,7 +2,7 @@ import { SvelteElement, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var div, current, mounted; + var div, current; return { c() { @@ -13,15 +13,10 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 86dcceccee..701f7d96b9 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -4,7 +4,7 @@ import { SvelteComponentDev, addLoc, append, createElement, createText, detachNo const file = undefined; function create_fragment($$, ctx) { - var h1, text0, text1, text2, text3, current, mounted; + var h1, text0, text1, text2, text3, current; return { c: function create() { @@ -27,7 +27,6 @@ function create_fragment($$, ctx) { append(h1, text1); append(h1, text2); insert(target, text3, anchor); - current = mounted = true; }, p: function update(changed, ctx) { @@ -38,10 +37,7 @@ function create_fragment($$, ctx) { debugger; }, - i: function intro(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d: function destroy(detach) { diff --git a/test/js/samples/debug-foo-bar-baz-things/expected.js b/test/js/samples/debug-foo-bar-baz-things/expected.js index 38a2675cc3..a0979bd1e6 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -55,7 +55,7 @@ function create_each_block($$, ctx) { } function create_fragment($$, ctx) { - var text0, p, text1, text2, current, mounted; + var text0, p, text1, text2, current; var each_value = ctx.things; @@ -91,7 +91,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text1); append(p, text2); - current = mounted = true; }, p: function update(changed, ctx) { @@ -121,10 +120,7 @@ function create_fragment($$, ctx) { } }, - i: function intro(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d: function destroy(detach) { diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 96891ebecc..78272ee28d 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -55,7 +55,7 @@ function create_each_block($$, ctx) { } function create_fragment($$, ctx) { - var text0, p, text1, text2, current, mounted; + var text0, p, text1, text2, current; var each_value = ctx.things; @@ -91,7 +91,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text1); append(p, text2); - current = mounted = true; }, p: function update(changed, ctx) { @@ -121,10 +120,7 @@ function create_fragment($$, ctx) { } }, - i: function intro(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d: function destroy(detach) { diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 0d4d881ba3..f98923d5e1 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -37,7 +37,7 @@ function create_each_block($$, ctx) { } function create_fragment($$, ctx) { - var each_anchor, current, mounted; + var each_anchor, current; var each_value = ctx.createElement; @@ -62,7 +62,6 @@ function create_fragment($$, ctx) { } insert(target, each_anchor, anchor); - current = mounted = true; }, p(changed, ctx) { @@ -88,10 +87,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/deconflict-globals/expected.js b/test/js/samples/deconflict-globals/expected.js index a3069d9ae5..42992e5c87 100644 --- a/test/js/samples/deconflict-globals/expected.js +++ b/test/js/samples/deconflict-globals/expected.js @@ -3,7 +3,7 @@ import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal import { onMount } from "svelte"; function create_fragment($$, ctx) { - var current, mounted; + var current; return { c: noop, diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js index 288205bc30..e503e02ea3 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -4,7 +4,7 @@ import { SvelteComponentDev, addLoc, append, createElement, createText, detachNo const file = undefined; function create_fragment($$, ctx) { - var p, text0_value = Math.max(0, ctx.foo), text0, text1, text2, current, mounted; + var p, text0_value = Math.max(0, ctx.foo), text0, text1, text2, current; return { c: function create() { @@ -24,7 +24,6 @@ function create_fragment($$, ctx) { append(p, text0); append(p, text1); append(p, text2); - current = mounted = true; }, p: function update(changed, ctx) { @@ -37,10 +36,7 @@ function create_fragment($$, ctx) { } }, - i: function intro(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d: function destroy(detach) { diff --git a/test/js/samples/do-use-dataset/expected.js b/test/js/samples/do-use-dataset/expected.js index 10d3ca7d02..79f0e10c4f 100644 --- a/test/js/samples/do-use-dataset/expected.js +++ b/test/js/samples/do-use-dataset/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var div0, text, div1, current, mounted; + var div0, text, div1, current; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, div0, anchor); insert(target, text, anchor); insert(target, div1, anchor); - current = mounted = true; }, p(changed, ctx) { @@ -26,10 +25,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected.js b/test/js/samples/dont-use-dataset-in-legacy/expected.js index 1a3cfcc02a..d2232e8c2b 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment($$, ctx) { - var div0, text, div1, current, mounted; + var div0, text, div1, current; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, div0, anchor); insert(target, text, anchor); insert(target, div1, anchor); - current = mounted = true; }, p(changed, ctx) { @@ -26,10 +25,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/dont-use-dataset-in-svg/expected.js b/test/js/samples/dont-use-dataset-in-svg/expected.js index aec7ce3f2a..3e2172b941 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment($$, ctx) { - var svg, g0, g1, current, mounted; + var svg, g0, g1, current; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, svg, anchor); append(svg, g0); append(svg, g1); - current = mounted = true; }, p(changed, ctx) { @@ -26,10 +25,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index c14efc96cc..1c6e0b873d 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -3,7 +3,7 @@ import { SvelteComponent as SvelteComponent_1, identity, init, mount_component, import LazyLoad from "./LazyLoad.html"; function create_fragment($$, ctx) { - var current, mounted; + var current; var lazyload = new LazyLoad({ props: { load: func } }); @@ -14,13 +14,15 @@ function create_fragment($$, ctx) { m(target, anchor) { mount_component(lazyload, target, anchor); - current = mounted = true; }, p: noop, - i(target, anchor) { - if (!mounted) this.m(target, anchor); + i() { + if (current) return; + lazyload.$$.fragment.i(); + + current = true; }, o() { diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index 9ea537c212..47734271bb 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -68,7 +68,7 @@ function create_each_block($$, ctx) { } function create_fragment($$, ctx) { - var text0, p, text1, current, mounted; + var text0, p, text1, current; var each_value = ctx.comments; @@ -97,7 +97,6 @@ function create_fragment($$, ctx) { insert(target, text0, anchor); insert(target, p, anchor); append(p, text1); - current = mounted = true; }, p(changed, ctx) { @@ -127,10 +126,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index 6ca1581376..5401e4b46b 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -56,7 +56,7 @@ function create_each_block($$, key_1, ctx) { } function create_fragment($$, ctx) { - var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current, mounted; + var each_blocks = [], each_lookup = blankObject(), each_anchor, current; var each_value = ctx.things; @@ -65,38 +65,34 @@ function create_fragment($$, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx); + each_blocks[i] = each_lookup[key] = create_each_block($$, key, child_ctx); } return { c() { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].c(); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); each_anchor = createComment(); }, m(target, anchor) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(target, anchor); insert(target, each_anchor, anchor); - current = mounted = true; }, p(changed, ctx) { const each_value = ctx.things; - for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].r(); - each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, "m", each_anchor, get_each_context); - for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].a(); - }, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); + for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].r(); + each_blocks = updateKeyedEach(each_blocks, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, each_anchor, get_each_context); + for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a(); }, + i: noop, o: noop, d(detach) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].d(detach); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].d(detach); if (detach) { detachNode(each_anchor); diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index 3d695e5167..e175ba706a 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -42,7 +42,7 @@ function create_each_block($$, key_1, ctx) { } function create_fragment($$, ctx) { - var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current, mounted; + var each_blocks = [], each_lookup = blankObject(), each_anchor, current; var each_value = ctx.things; @@ -51,36 +51,32 @@ function create_fragment($$, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx); + each_blocks[i] = each_lookup[key] = create_each_block($$, key, child_ctx); } return { c() { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].c(); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].c(); each_anchor = createComment(); }, m(target, anchor) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].m(target, anchor); insert(target, each_anchor, anchor); - current = mounted = true; }, p(changed, ctx) { const each_value = ctx.things; - each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, "m", each_anchor, get_each_context); - }, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); + each_blocks = updateKeyedEach(each_blocks, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, each_anchor, get_each_context); }, + i: noop, o: noop, d(detach) { - for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].d(detach); + for (i = 0; i < each_blocks.length; i += 1) each_blocks[i].d(detach); if (detach) { detachNode(each_anchor); diff --git a/test/js/samples/event-handler-no-passive/expected.js b/test/js/samples/event-handler-no-passive/expected.js index 4f0219f096..50de622d75 100644 --- a/test/js/samples/event-handler-no-passive/expected.js +++ b/test/js/samples/event-handler-no-passive/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var a, current, mounted, dispose; + var a, current, dispose; return { c() { @@ -14,15 +14,10 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, a, anchor); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js index 7fea6779ba..4159662487 100644 --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, identity, init, insert, noop, preventDefault, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; function create_fragment($$, ctx) { - var div, button0, text1, button1, text3, button2, current, mounted, dispose; + var div, button0, text1, button1, text3, button2, current, dispose; return { c() { @@ -30,15 +30,10 @@ function create_fragment($$, ctx) { append(div, button1); append(div, text3); append(div, button2); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index bfd258671e..b581a978c0 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var meta0, meta1, current, mounted; + var meta0, meta1, current; return { c() { @@ -17,15 +17,10 @@ function create_fragment($$, ctx) { m(target, anchor) { append(document.head, meta0); append(document.head, meta1); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/hoisted-const/expected.js b/test/js/samples/hoisted-const/expected.js index f478f72648..8fecad49d5 100644 --- a/test/js/samples/hoisted-const/expected.js +++ b/test/js/samples/hoisted-const/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var b, text_value = get_answer(), text, current, mounted; + var b, text_value = get_answer(), text, current; return { c() { @@ -13,15 +13,10 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, b, anchor); append(b, text); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index 6a9ca01c28..30b253f376 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -46,7 +46,7 @@ function create_if_block($$, ctx) { } function create_fragment($$, ctx) { - var if_block_anchor, current, mounted; + var if_block_anchor, current; function select_block_type(ctx) { if (ctx.foo) return create_if_block; @@ -65,22 +65,20 @@ function create_fragment($$, ctx) { m(target, anchor) { if_block.m(target, anchor); insert(target, if_block_anchor, anchor); - current = mounted = true; }, p(changed, ctx) { if (current_block_type !== (current_block_type = select_block_type(ctx))) { if_block.d(1); if_block = current_block_type($$, ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index 50d5217456..3efd6327cd 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -24,7 +24,7 @@ function create_if_block($$, ctx) { } function create_fragment($$, ctx) { - var if_block_anchor, current, mounted; + var if_block_anchor, current; var if_block = (ctx.foo) && create_if_block($$, ctx); @@ -37,7 +37,6 @@ function create_fragment($$, ctx) { m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); - current = mounted = true; }, p(changed, ctx) { @@ -53,10 +52,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index b2994e861d..22edb81477 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; function create_fragment($$, ctx) { - var div, current, mounted; + var div, current; return { c() { @@ -13,7 +13,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = mounted = true; }, p(changed, ctx) { @@ -26,10 +25,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index 8a2571bcd9..3e00c44bde 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; function create_fragment($$, ctx) { - var div, current, mounted; + var div, current; return { c() { @@ -12,7 +12,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = mounted = true; }, p(changed, ctx) { @@ -21,10 +20,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index fb5952b419..bfe53a92b6 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; function create_fragment($$, ctx) { - var div, current, mounted; + var div, current; return { c() { @@ -12,7 +12,6 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, div, anchor); - current = mounted = true; }, p(changed, ctx) { @@ -21,10 +20,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index c19241c2fc..7ec39c777f 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var div0, text, div1, div1_style_value, current, mounted; + var div0, text, div1, div1_style_value, current; return { c() { @@ -17,7 +17,6 @@ function create_fragment($$, ctx) { insert(target, div0, anchor); insert(target, text, anchor); insert(target, div1, anchor); - current = mounted = true; }, p(changed, ctx) { @@ -30,10 +29,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index 2a35cfa708..6e5ed1f171 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment($$, ctx) { - var input, current, mounted, dispose; + var input, current, dispose; return { c() { @@ -14,15 +14,10 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, input, anchor); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index e092c7c54c..5e4b1b5b83 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal"; function create_fragment($$, ctx) { - var input, current, mounted, dispose; + var input, current, dispose; return { c() { @@ -19,18 +19,13 @@ function create_fragment($$, ctx) { insert(target, input, anchor); input.value = ctx.value; - - current = mounted = true; }, p(changed, ctx) { if (changed.value) input.value = ctx.value; }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index 05b85d82e8..35fb70ee5c 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; function create_fragment($$, ctx) { - var input, current, mounted, dispose; + var input, current, dispose; return { c() { @@ -15,18 +15,13 @@ function create_fragment($$, ctx) { insert(target, input, anchor); input.checked = ctx.foo; - - current = mounted = true; }, p(changed, ctx) { if (changed.foo) input.checked = ctx.foo; }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/instrumentation-script-if-no-block/expected.js b/test/js/samples/instrumentation-script-if-no-block/expected.js index e461bac6c1..26e8ff3609 100644 --- a/test/js/samples/instrumentation-script-if-no-block/expected.js +++ b/test/js/samples/instrumentation-script-if-no-block/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var button, text1, p, text2, text3, current, mounted, dispose; + var button, text1, p, text2, text3, current, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = mounted = true; }, p(changed, ctx) { @@ -30,10 +29,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/instrumentation-script-x-equals-x/expected.js b/test/js/samples/instrumentation-script-x-equals-x/expected.js index 37ef90b46e..615fe4dcb8 100644 --- a/test/js/samples/instrumentation-script-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-script-x-equals-x/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var button, text1, p, text2, text3_value = ctx.things.length, text3, current, mounted, dispose; + var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = mounted = true; }, p(changed, ctx) { @@ -30,10 +29,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index 12320d4d43..50eb0bba3e 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var button, text1, p, text2, text3, current, mounted, dispose; + var button, text1, p, text2, text3, current, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = mounted = true; }, p(changed, ctx) { @@ -30,10 +29,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/instrumentation-template-x-equals-x/expected.js b/test/js/samples/instrumentation-template-x-equals-x/expected.js index 21d25baa47..1e3bbd51fc 100644 --- a/test/js/samples/instrumentation-template-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-template-x-equals-x/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var button, text1, p, text2, text3_value = ctx.things.length, text3, current, mounted, dispose; + var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; return { c() { @@ -21,7 +21,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text2); append(p, text3); - current = mounted = true; }, p(changed, ctx) { @@ -30,10 +29,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/legacy-input-type/expected.js b/test/js/samples/legacy-input-type/expected.js index 79ac9cdb43..b3b63b740a 100644 --- a/test/js/samples/legacy-input-type/expected.js +++ b/test/js/samples/legacy-input-type/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, safe_not_equal, setInputType } from "svelte/internal"; function create_fragment($$, ctx) { - var input, current, mounted; + var input, current; return { c() { @@ -12,15 +12,10 @@ function create_fragment($$, ctx) { m(target, anchor) { insert(target, input, anchor); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index 7add6cf7d8..cf9a68c9d5 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal"; function create_fragment($$, ctx) { - var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, current, mounted, dispose; + var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, current, dispose; function audio_timeupdate_handler() { cancelAnimationFrame(audio_animationframe); @@ -34,8 +34,6 @@ function create_fragment($$, ctx) { insert(target, audio, anchor); audio.volume = ctx.volume; - - current = mounted = true; }, p(changed, ctx) { @@ -45,10 +43,7 @@ function create_fragment($$, ctx) { audio_updating = false; }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 343bdb2453..e80b8d0ab1 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -3,7 +3,7 @@ import { SvelteComponent as SvelteComponent_1, createText, detachNode, identity, import Imported from "Imported.html"; function create_fragment($$, ctx) { - var text, current, mounted; + var text, current; var imported = new Imported({}); @@ -20,13 +20,17 @@ function create_fragment($$, ctx) { mount_component(imported, target, anchor); insert(target, text, anchor); mount_component(nonimported, target, anchor); - current = mounted = true; }, p: noop, - i(target, anchor) { - if (!mounted) this.m(target, anchor); + i() { + if (current) return; + imported.$$.fragment.i(); + + nonimported.$$.fragment.i(); + + current = true; }, o() { diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js index 281f3e98ae..a21d9b764f 100644 --- a/test/js/samples/select-dynamic-value/expected.js +++ b/test/js/samples/select-dynamic-value/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var select, option0, option1, select_value_value, current_1, mounted; + var select, option0, option1, select_value_value, current_1; return { c() { @@ -31,8 +31,6 @@ function create_fragment($$, ctx) { break; } } - - current_1 = mounted = true; }, p(changed, ctx) { @@ -48,10 +46,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/setup-method/expected.js b/test/js/samples/setup-method/expected.js index 94a6068bb4..a9d9ee4a1e 100644 --- a/test/js/samples/setup-method/expected.js +++ b/test/js/samples/setup-method/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, identity, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var current, mounted; + var current; return { c: noop, diff --git a/test/js/samples/svg-title/expected.js b/test/js/samples/svg-title/expected.js index 8658434265..13d6333325 100644 --- a/test/js/samples/svg-title/expected.js +++ b/test/js/samples/svg-title/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, identity, init, insert, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var svg, title, text, current, mounted; + var svg, title, text, current; return { c() { @@ -15,15 +15,10 @@ function create_fragment($$, ctx) { insert(target, svg, anchor); append(svg, title); append(title, text); - current = mounted = true; }, p: noop, - - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index ba0a6337b5..862c56bc3e 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; function create_fragment($$, ctx) { - var title_value, current, mounted; + var title_value, current; document.title = title_value = "a " + ctx.custom + " title"; diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index 4e65d09fd3..a939e66a3a 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -112,7 +112,7 @@ function create_if_block($$, ctx) { } function create_fragment($$, ctx) { - var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor, current, mounted; + var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor, current; var if_block0 = (ctx.a) && create_if_block_4($$, ctx); @@ -161,7 +161,6 @@ function create_fragment($$, ctx) { insert(target, text7, anchor); if (if_block4) if_block4.m(target, anchor); insert(target, if_block4_anchor, anchor); - current = mounted = true; }, p(changed, ctx) { @@ -221,10 +220,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 7c5737ba7f..c1cb7bd1aa 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; function create_fragment($$, ctx) { - var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, current, mounted, dispose; + var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, current, dispose; add_render_callback(ctx.onwindowscroll); @@ -23,7 +23,6 @@ function create_fragment($$, ctx) { insert(target, p, anchor); append(p, text0); append(p, text1); - current = mounted = true; }, p(changed, ctx) { @@ -39,10 +38,7 @@ function create_fragment($$, ctx) { } }, - i(target, anchor) { - if (!mounted) this.m(target, anchor); - }, - + i: noop, o: noop, d(detach) { diff --git a/test/runtime/index.js b/test/runtime/index.js index 8699551842..8912e3dab0 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -27,7 +27,7 @@ function getName(filename) { const sveltePath = process.cwd().split('\\').join('/'); const internal = `${sveltePath}/internal.js`; -describe.only("runtime", () => { +describe("runtime", () => { before(() => { svelte = loadSvelte(false); svelte$ = loadSvelte(true);