From afe0ec6b8d2d4f03c6f630b9625df41fe038c98c Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Mon, 18 Mar 2019 08:48:01 -0400 Subject: [PATCH] update js tests --- .../expected.js | 6 ++--- test/js/samples/debug-empty/expected.js | 12 +++++----- .../debug-foo-bar-baz-things/expected.js | 14 ++++++------ test/js/samples/debug-foo/expected.js | 14 ++++++------ .../samples/deconflict-builtins/expected.js | 6 ++--- .../expected.js | 10 ++++----- test/js/samples/do-use-dataset/expected.js | 6 ++--- .../dont-use-dataset-in-legacy/expected.js | 6 ++--- .../each-block-array-literal/expected.js | 6 ++--- .../each-block-changed-check/expected.js | 22 +++++++++---------- .../each-block-keyed-animated/expected.js | 4 ++-- test/js/samples/each-block-keyed/expected.js | 4 ++-- test/js/samples/event-modifiers/expected.js | 8 +++---- test/js/samples/hoisted-const/expected.js | 6 ++--- test/js/samples/hoisted-let/expected.js | 6 ++--- .../inline-style-unoptimized/expected.js | 6 ++--- .../expected.js | 10 ++++----- .../expected.js | 10 ++++----- .../expected.js | 10 ++++----- .../expected.js | 10 ++++----- .../non-imported-component/expected.js | 6 ++--- .../samples/non-mutable-reference/expected.js | 10 ++++----- test/js/samples/svg-title/expected.js | 6 ++--- .../use-elements-as-anchors/expected.js | 16 +++++++------- .../samples/window-binding-scroll/expected.js | 8 +++---- 25 files changed, 111 insertions(+), 111 deletions(-) diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 68b592b597..e40997203b 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -2,14 +2,14 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, element, init, insert, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; function add_css() { @@ -25,7 +25,7 @@ function create_fragment(ctx) { return { c() { p = element("p"); - t = create_text(ctx.foo); + t = text(ctx.foo); p.className = "svelte-1a7i8ec"; }, diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 1283e82994..f122a7b979 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -3,14 +3,14 @@ import { SvelteComponentDev, add_location, append, - create_text, detach, element, init, insert, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; const file = undefined; @@ -21,10 +21,10 @@ function create_fragment(ctx) { return { c: function create() { h1 = element("h1"); - t0 = create_text("Hello "); - t1 = create_text(ctx.name); - t2 = create_text("!"); - t3 = create_text("\n"); + t0 = text("Hello "); + t1 = text(ctx.name); + t2 = text("!"); + t3 = text("\n"); debugger; add_location(h1, file, 4, 0, 38); }, 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 5c0c6005f2..b8b134606c 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -3,7 +3,6 @@ import { SvelteComponentDev, add_location, append, - create_text, destroy_each, detach, element, @@ -11,7 +10,8 @@ import { insert, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; const file = undefined; @@ -29,8 +29,8 @@ function create_each_block(ctx) { return { c: function create() { span = element("span"); - t0 = create_text(t0_value); - t1 = create_text("\n\t"); + t0 = text(t0_value); + t1 = text("\n\t"); { const { foo, bar, baz, thing } = ctx; @@ -84,10 +84,10 @@ function create_fragment(ctx) { each_blocks[i].c(); } - t0 = create_text("\n\n"); + t0 = text("\n\n"); p = element("p"); - t1 = create_text("foo: "); - t2 = create_text(ctx.foo); + t1 = text("foo: "); + t2 = text(ctx.foo); add_location(p, file, 12, 0, 182); }, diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 3d547b2a4b..94f580ed9d 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -3,7 +3,6 @@ import { SvelteComponentDev, add_location, append, - create_text, destroy_each, detach, element, @@ -11,7 +10,8 @@ import { insert, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; const file = undefined; @@ -29,8 +29,8 @@ function create_each_block(ctx) { return { c: function create() { span = element("span"); - t0 = create_text(t0_value); - t1 = create_text("\n\t"); + t0 = text(t0_value); + t1 = text("\n\t"); { const { foo } = ctx; @@ -84,10 +84,10 @@ function create_fragment(ctx) { each_blocks[i].c(); } - t0 = create_text("\n\n"); + t0 = text("\n\n"); p = element("p"); - t1 = create_text("foo: "); - t2 = create_text(ctx.foo); + t1 = text("foo: "); + t2 = text(ctx.foo); add_location(p, file, 10, 0, 131); }, diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 5423faaf80..32bbdb4394 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -3,7 +3,6 @@ import { SvelteComponent as SvelteComponent_1, append, comment, - create_text, destroy_each, detach, element, @@ -11,7 +10,8 @@ import { insert, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; function get_each_context(ctx, list, i) { @@ -27,7 +27,7 @@ function create_each_block(ctx) { return { c() { span = element("span"); - t = create_text(t_value); + t = text(t_value); }, m(target, anchor) { 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 81b8d3be9d..447477bea5 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -3,14 +3,14 @@ import { SvelteComponentDev, add_location, append, - create_text, detach, element, init, insert, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; const file = undefined; @@ -21,9 +21,9 @@ function create_fragment(ctx) { return { c: function create() { p = element("p"); - t0 = create_text(t0_value); - t1 = create_text("\n\t"); - t2 = create_text(ctx.bar); + t0 = text(t0_value); + t1 = text("\n\t"); + t2 = text(ctx.bar); add_location(p, file, 7, 0, 67); }, diff --git a/test/js/samples/do-use-dataset/expected.js b/test/js/samples/do-use-dataset/expected.js index 7f0d66ebdc..51c5a83f9d 100644 --- a/test/js/samples/do-use-dataset/expected.js +++ b/test/js/samples/do-use-dataset/expected.js @@ -1,13 +1,13 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, - create_text, detach, element, init, insert, noop, - safe_not_equal + safe_not_equal, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -16,7 +16,7 @@ function create_fragment(ctx) { return { c() { div0 = element("div"); - t = create_text("\n"); + t = text("\n"); div1 = element("div"); div0.dataset.foo = "bar"; div1.dataset.foo = ctx.bar; 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 1ea2935770..700280901f 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected.js @@ -2,13 +2,13 @@ import { SvelteComponent as SvelteComponent_1, attr, - create_text, detach, element, init, insert, noop, - safe_not_equal + safe_not_equal, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -17,7 +17,7 @@ function create_fragment(ctx) { return { c() { div0 = element("div"); - t = create_text("\n"); + t = text("\n"); div1 = element("div"); attr(div0, "data-foo", "bar"); attr(div1, "data-foo", ctx.bar); diff --git a/test/js/samples/each-block-array-literal/expected.js b/test/js/samples/each-block-array-literal/expected.js index c7e46ec1b2..be3b4a3b45 100644 --- a/test/js/samples/each-block-array-literal/expected.js +++ b/test/js/samples/each-block-array-literal/expected.js @@ -3,7 +3,6 @@ import { SvelteComponent as SvelteComponent_1, append, comment, - create_text, destroy_each, detach, element, @@ -11,7 +10,8 @@ import { insert, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; function get_each_context(ctx, list, i) { @@ -27,7 +27,7 @@ function create_each_block(ctx) { return { c() { span = element("span"); - t = create_text(t_value); + t = text(t_value); }, m(target, anchor) { diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index e97760f7a8..89906806bc 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -2,7 +2,6 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, destroy_each, detach, detach_after, @@ -11,7 +10,8 @@ import { insert, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; function get_each_context(ctx, list, i) { @@ -29,14 +29,14 @@ function create_each_block(ctx) { c() { div = element("div"); strong = element("strong"); - t0 = create_text(ctx.i); - t1 = create_text("\n\n\t\t"); + t0 = text(ctx.i); + t1 = text("\n\n\t\t"); span = element("span"); - t2 = create_text(t2_value); - t3 = create_text(" wrote "); - t4 = create_text(t4_value); - t5 = create_text(" ago:"); - t6 = create_text("\n\n\t\t"); + t2 = text(t2_value); + t3 = text(" wrote "); + t4 = text(t4_value); + t5 = text(" ago:"); + t6 = text("\n\n\t\t"); raw_before = element('noscript'); span.className = "meta"; div.className = "comment"; @@ -97,9 +97,9 @@ function create_fragment(ctx) { each_blocks[i].c(); } - t0 = create_text("\n\n"); + t0 = text("\n\n"); p = element("p"); - t1 = create_text(ctx.foo); + t1 = text(ctx.foo); }, m(target, anchor) { diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index 8a5a69e878..fd879530ea 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -5,7 +5,6 @@ import { blank_object, comment, create_animation, - create_text, detach, element, fix_and_outro_and_destroy_block, @@ -15,6 +14,7 @@ import { noop, safe_not_equal, set_data, + text, update_keyed_each } from "svelte/internal"; @@ -35,7 +35,7 @@ function create_each_block(key_1, ctx) { c() { div = element("div"); - t = create_text(t_value); + t = text(t_value); this.first = div; }, diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index b896db617c..c20a43d4d4 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -4,7 +4,6 @@ import { append, blank_object, comment, - create_text, destroy_block, detach, element, @@ -13,6 +12,7 @@ import { noop, safe_not_equal, set_data, + text, update_keyed_each } from "svelte/internal"; @@ -33,7 +33,7 @@ function create_each_block(key_1, ctx) { c() { div = element("div"); - t = create_text(t_value); + t = text(t_value); this.first = div; }, diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js index 2ef4bf56ab..9d83341f1b 100644 --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -2,7 +2,6 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, element, init, @@ -12,7 +11,8 @@ import { prevent_default, run_all, safe_not_equal, - stop_propagation + stop_propagation, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -23,10 +23,10 @@ function create_fragment(ctx) { div = element("div"); button0 = element("button"); button0.textContent = "click me"; - t1 = create_text("\n\t"); + t1 = text("\n\t"); button1 = element("button"); button1.textContent = "or me"; - t3 = create_text("\n\t"); + t3 = text("\n\t"); button2 = element("button"); button2.textContent = "or me!"; dispose = [ diff --git a/test/js/samples/hoisted-const/expected.js b/test/js/samples/hoisted-const/expected.js index 0f6a5a05a9..8f061bf80b 100644 --- a/test/js/samples/hoisted-const/expected.js +++ b/test/js/samples/hoisted-const/expected.js @@ -2,13 +2,13 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, element, init, insert, noop, - safe_not_equal + safe_not_equal, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -17,7 +17,7 @@ function create_fragment(ctx) { return { c() { b = element("b"); - t = create_text(t_value); + t = text(t_value); }, m(target, anchor) { diff --git a/test/js/samples/hoisted-let/expected.js b/test/js/samples/hoisted-let/expected.js index cba0c12337..52390c1e26 100644 --- a/test/js/samples/hoisted-let/expected.js +++ b/test/js/samples/hoisted-let/expected.js @@ -2,13 +2,13 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, element, init, insert, noop, - safe_not_equal + safe_not_equal, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -17,7 +17,7 @@ function create_fragment(ctx) { return { c() { b = element("b"); - t = create_text(t_value); + t = text(t_value); }, m(target, anchor) { diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 27b52b67c7..0516cc3ef1 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -1,13 +1,13 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, - create_text, detach, element, init, insert, noop, - safe_not_equal + safe_not_equal, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -16,7 +16,7 @@ function create_fragment(ctx) { return { c() { div0 = element("div"); - t = create_text("\n"); + t = text("\n"); div1 = element("div"); div0.style.cssText = ctx.style; div1.style.cssText = div1_style_value = "" + ctx.key + ": " + ctx.value; 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 ae835db80d..bb6e3f8ef5 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,6 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, element, init, @@ -10,7 +9,8 @@ import { listen, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -20,10 +20,10 @@ function create_fragment(ctx) { c() { button = element("button"); button.textContent = "foo"; - t1 = create_text("\n\n"); + t1 = text("\n\n"); p = element("p"); - t2 = create_text("x: "); - t3 = create_text(ctx.x); + t2 = text("x: "); + t3 = text(ctx.x); dispose = listen(button, "click", ctx.foo); }, 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 4b30477c4f..015dd39415 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,6 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, element, init, @@ -10,7 +9,8 @@ import { listen, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -20,10 +20,10 @@ function create_fragment(ctx) { c() { button = element("button"); button.textContent = "foo"; - t1 = create_text("\n\n"); + t1 = text("\n\n"); p = element("p"); - t2 = create_text("number of things: "); - t3 = create_text(t3_value); + t2 = text("number of things: "); + t3 = text(t3_value); dispose = listen(button, "click", ctx.foo); }, 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 0a9b5c6d04..fc50a8b850 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,6 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, element, init, @@ -10,7 +9,8 @@ import { listen, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -20,10 +20,10 @@ function create_fragment(ctx) { c() { button = element("button"); button.textContent = "foo"; - t1 = create_text("\n\n"); + t1 = text("\n\n"); p = element("p"); - t2 = create_text("x: "); - t3 = create_text(ctx.x); + t2 = text("x: "); + t3 = text(ctx.x); dispose = listen(button, "click", ctx.click_handler); }, 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 6eb906a4ed..14a7e61274 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,6 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, element, init, @@ -10,7 +9,8 @@ import { listen, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -20,10 +20,10 @@ function create_fragment(ctx) { c() { button = element("button"); button.textContent = "foo"; - t1 = create_text("\n\n"); + t1 = text("\n\n"); p = element("p"); - t2 = create_text("number of things: "); - t3 = create_text(t3_value); + t2 = text("number of things: "); + t3 = text(t3_value); dispose = listen(button, "click", ctx.click_handler); }, diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 0741a14301..ccde3230d3 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -1,13 +1,13 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, - create_text, detach, init, insert, mount_component, noop, - safe_not_equal + safe_not_equal, + text } from "svelte/internal"; import Imported from "Imported.svelte"; @@ -21,7 +21,7 @@ function create_fragment(ctx) { return { c() { imported.$$.fragment.c(); - t = create_text("\n"); + t = text("\n"); nonimported.$$.fragment.c(); }, diff --git a/test/js/samples/non-mutable-reference/expected.js b/test/js/samples/non-mutable-reference/expected.js index 0c687ecd7a..1bad71a937 100644 --- a/test/js/samples/non-mutable-reference/expected.js +++ b/test/js/samples/non-mutable-reference/expected.js @@ -2,13 +2,13 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, element, init, insert, noop, - safe_not_equal + safe_not_equal, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -17,9 +17,9 @@ function create_fragment(ctx) { return { c() { h1 = element("h1"); - t0 = create_text("Hello "); - t1 = create_text(name); - t2 = create_text("!"); + t0 = text("Hello "); + t1 = text(name); + t2 = text("!"); }, m(target, anchor) { diff --git a/test/js/samples/svg-title/expected.js b/test/js/samples/svg-title/expected.js index 496a24d29a..49bd406987 100644 --- a/test/js/samples/svg-title/expected.js +++ b/test/js/samples/svg-title/expected.js @@ -2,13 +2,13 @@ import { SvelteComponent as SvelteComponent_1, append, - create_text, detach, init, insert, noop, safe_not_equal, - svg_element + svg_element, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -18,7 +18,7 @@ function create_fragment(ctx) { c() { svg = svg_element("svg"); title = svg_element("title"); - t = create_text("a title"); + t = text("a title"); }, m(target, anchor) { diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index b7b19bc220..4a7d84bf01 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -3,13 +3,13 @@ import { SvelteComponent as SvelteComponent_1, append, comment, - create_text, detach, element, init, insert, noop, - safe_not_equal + safe_not_equal, + text } from "svelte/internal"; // (10:1) {#if a} @@ -139,19 +139,19 @@ function create_fragment(ctx) { c() { div = element("div"); if (if_block0) if_block0.c(); - t0 = create_text("\n\n\t"); + t0 = text("\n\n\t"); p0 = element("p"); p0.textContent = "this can be used as an anchor"; - t2 = create_text("\n\n\t"); + t2 = text("\n\n\t"); if (if_block1) if_block1.c(); - t3 = create_text("\n\n\t"); + t3 = text("\n\n\t"); if (if_block2) if_block2.c(); - t4 = create_text("\n\n\t"); + t4 = text("\n\n\t"); p1 = element("p"); p1.textContent = "so can this"; - t6 = create_text("\n\n\t"); + t6 = text("\n\n\t"); if (if_block3) if_block3.c(); - t7 = create_text("\n\n"); + t7 = text("\n\n"); if (if_block4) if_block4.c(); if_block4_anchor = comment(); }, diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 375e03ec38..5a6601b851 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -3,7 +3,6 @@ import { SvelteComponent as SvelteComponent_1, add_render_callback, append, - create_text, detach, element, init, @@ -11,7 +10,8 @@ import { listen, noop, safe_not_equal, - set_data + set_data, + text } from "svelte/internal"; function create_fragment(ctx) { @@ -22,8 +22,8 @@ function create_fragment(ctx) { return { c() { p = element("p"); - t0 = create_text("scrolled to "); - t1 = create_text(ctx.y); + t0 = text("scrolled to "); + t1 = text(ctx.y); dispose = listen(window, "scroll", () => { scrolling = true; clearTimeout(scrolling_timeout);