From f0048371961b7243b15c13a5738bbd404ab29ad5 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 26 Jan 2018 13:29:21 -0500 Subject: [PATCH] update snapshot tests --- .../collapses-text-around-comments/expected-bundle.js | 2 +- .../samples/collapses-text-around-comments/expected.js | 2 +- test/js/samples/component-static/expected-bundle.js | 2 +- .../samples/computed-collapsed-if/expected-bundle.js | 2 +- test/js/samples/css-media-query/expected-bundle.js | 2 +- test/js/samples/css-media-query/expected.js | 2 +- .../css-shadow-dom-keyframes/expected-bundle.js | 2 +- test/js/samples/deconflict-globals/expected-bundle.js | 10 +++++----- test/js/samples/deconflict-globals/expected.js | 8 ++++---- test/js/samples/do-use-dataset/expected-bundle.js | 2 +- .../dont-use-dataset-in-legacy/expected-bundle.js | 2 +- .../samples/dont-use-dataset-in-svg/expected-bundle.js | 2 +- .../each-block-changed-check/expected-bundle.js | 2 +- .../samples/event-handlers-custom/expected-bundle.js | 2 +- test/js/samples/head-no-whitespace/expected-bundle.js | 2 +- test/js/samples/if-block-no-update/expected-bundle.js | 2 +- test/js/samples/if-block-simple/expected-bundle.js | 2 +- .../inline-style-optimized-multiple/expected-bundle.js | 2 +- .../inline-style-optimized-url/expected-bundle.js | 2 +- .../samples/inline-style-optimized/expected-bundle.js | 2 +- .../inline-style-unoptimized/expected-bundle.js | 2 +- .../input-without-blowback-guard/expected-bundle.js | 2 +- test/js/samples/legacy-input-type/expected-bundle.js | 2 +- test/js/samples/legacy-quote-class/expected-bundle.js | 2 +- test/js/samples/media-bindings/expected-bundle.js | 2 +- .../samples/non-imported-component/expected-bundle.js | 2 +- .../onrender-onteardown-rewritten/expected-bundle.js | 10 +++++----- .../samples/onrender-onteardown-rewritten/expected.js | 8 ++++---- test/js/samples/setup-method/expected-bundle.js | 2 +- test/js/samples/svg-title/expected-bundle.js | 2 +- test/js/samples/title/expected-bundle.js | 2 +- .../samples/use-elements-as-anchors/expected-bundle.js | 2 +- .../samples/window-binding-scroll/expected-bundle.js | 2 +- 33 files changed, 47 insertions(+), 47 deletions(-) diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js index fd2c6d9b03..59cd2de125 100644 --- a/test/js/samples/collapses-text-around-comments/expected-bundle.js +++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js @@ -167,7 +167,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index babc926f91..aea4721e36 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -64,4 +64,4 @@ function SvelteComponent(options) { } assign(SvelteComponent.prototype, proto); -export default SvelteComponent; +export default SvelteComponent; \ No newline at end of file diff --git a/test/js/samples/component-static/expected-bundle.js b/test/js/samples/component-static/expected-bundle.js index d304821c98..708ef5be95 100644 --- a/test/js/samples/component-static/expected-bundle.js +++ b/test/js/samples/component-static/expected-bundle.js @@ -143,7 +143,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/computed-collapsed-if/expected-bundle.js b/test/js/samples/computed-collapsed-if/expected-bundle.js index 1732dcf323..b39f95a77b 100644 --- a/test/js/samples/computed-collapsed-if/expected-bundle.js +++ b/test/js/samples/computed-collapsed-if/expected-bundle.js @@ -143,7 +143,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/css-media-query/expected-bundle.js b/test/js/samples/css-media-query/expected-bundle.js index e5502c0a31..91662053a4 100644 --- a/test/js/samples/css-media-query/expected-bundle.js +++ b/test/js/samples/css-media-query/expected-bundle.js @@ -163,7 +163,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index 567ae27255..37afa6b42a 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -54,4 +54,4 @@ function SvelteComponent(options) { } assign(SvelteComponent.prototype, proto); -export default SvelteComponent; +export default SvelteComponent; \ No newline at end of file diff --git a/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js b/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js index 3edee605c1..03e5cef1e2 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js @@ -155,7 +155,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/deconflict-globals/expected-bundle.js b/test/js/samples/deconflict-globals/expected-bundle.js index ea55a11851..ba22542c4b 100644 --- a/test/js/samples/deconflict-globals/expected-bundle.js +++ b/test/js/samples/deconflict-globals/expected-bundle.js @@ -143,7 +143,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { @@ -201,13 +201,13 @@ function SvelteComponent(options) { var _oncreate = oncreate.bind(this); if (!options.root) { - this._oncreate = [_oncreate]; - } else { - this.root._oncreate.push(_oncreate); - } + this._oncreate = []; + } this._fragment = create_main_fragment(this._state, this); + this.root._oncreate.push(_oncreate); + if (options.target) { this._fragment.c(); this._fragment.m(options.target, options.anchor || null); diff --git a/test/js/samples/deconflict-globals/expected.js b/test/js/samples/deconflict-globals/expected.js index d08d3dc9a1..8730f4e3c3 100644 --- a/test/js/samples/deconflict-globals/expected.js +++ b/test/js/samples/deconflict-globals/expected.js @@ -33,13 +33,13 @@ function SvelteComponent(options) { var _oncreate = oncreate.bind(this); if (!options.root) { - this._oncreate = [_oncreate]; - } else { - this.root._oncreate.push(_oncreate); - } + this._oncreate = []; + } this._fragment = create_main_fragment(this._state, this); + this.root._oncreate.push(_oncreate); + if (options.target) { this._fragment.c(); this._fragment.m(options.target, options.anchor || null); diff --git a/test/js/samples/do-use-dataset/expected-bundle.js b/test/js/samples/do-use-dataset/expected-bundle.js index b768840f2e..2079e6607c 100644 --- a/test/js/samples/do-use-dataset/expected-bundle.js +++ b/test/js/samples/do-use-dataset/expected-bundle.js @@ -159,7 +159,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js b/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js index da13568e97..efcfcc8f30 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js @@ -163,7 +163,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js b/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js index ad53e6a274..cf43bbd130 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js @@ -163,7 +163,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/each-block-changed-check/expected-bundle.js b/test/js/samples/each-block-changed-check/expected-bundle.js index 90f3eeadef..e35826e354 100644 --- a/test/js/samples/each-block-changed-check/expected-bundle.js +++ b/test/js/samples/each-block-changed-check/expected-bundle.js @@ -175,7 +175,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/event-handlers-custom/expected-bundle.js b/test/js/samples/event-handlers-custom/expected-bundle.js index 17943516aa..43db3035a3 100644 --- a/test/js/samples/event-handlers-custom/expected-bundle.js +++ b/test/js/samples/event-handlers-custom/expected-bundle.js @@ -155,7 +155,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/head-no-whitespace/expected-bundle.js b/test/js/samples/head-no-whitespace/expected-bundle.js index f6e4968c9e..91f894bc30 100644 --- a/test/js/samples/head-no-whitespace/expected-bundle.js +++ b/test/js/samples/head-no-whitespace/expected-bundle.js @@ -155,7 +155,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/if-block-no-update/expected-bundle.js b/test/js/samples/if-block-no-update/expected-bundle.js index 966081e9ed..b309a25e96 100644 --- a/test/js/samples/if-block-no-update/expected-bundle.js +++ b/test/js/samples/if-block-no-update/expected-bundle.js @@ -159,7 +159,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/if-block-simple/expected-bundle.js b/test/js/samples/if-block-simple/expected-bundle.js index 63fed6f4cf..5084639f4b 100644 --- a/test/js/samples/if-block-simple/expected-bundle.js +++ b/test/js/samples/if-block-simple/expected-bundle.js @@ -159,7 +159,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/inline-style-optimized-multiple/expected-bundle.js b/test/js/samples/inline-style-optimized-multiple/expected-bundle.js index 53526770d7..753d61db71 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected-bundle.js +++ b/test/js/samples/inline-style-optimized-multiple/expected-bundle.js @@ -159,7 +159,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/inline-style-optimized-url/expected-bundle.js b/test/js/samples/inline-style-optimized-url/expected-bundle.js index 45848aad35..cf360881b1 100644 --- a/test/js/samples/inline-style-optimized-url/expected-bundle.js +++ b/test/js/samples/inline-style-optimized-url/expected-bundle.js @@ -159,7 +159,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/inline-style-optimized/expected-bundle.js b/test/js/samples/inline-style-optimized/expected-bundle.js index 84e4f81567..38024df4ff 100644 --- a/test/js/samples/inline-style-optimized/expected-bundle.js +++ b/test/js/samples/inline-style-optimized/expected-bundle.js @@ -159,7 +159,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/inline-style-unoptimized/expected-bundle.js b/test/js/samples/inline-style-unoptimized/expected-bundle.js index 5d04406716..320c733a43 100644 --- a/test/js/samples/inline-style-unoptimized/expected-bundle.js +++ b/test/js/samples/inline-style-unoptimized/expected-bundle.js @@ -159,7 +159,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/input-without-blowback-guard/expected-bundle.js b/test/js/samples/input-without-blowback-guard/expected-bundle.js index 22778e66cf..eacaca85a6 100644 --- a/test/js/samples/input-without-blowback-guard/expected-bundle.js +++ b/test/js/samples/input-without-blowback-guard/expected-bundle.js @@ -163,7 +163,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/legacy-input-type/expected-bundle.js b/test/js/samples/legacy-input-type/expected-bundle.js index 802dbfc100..7b730f08d9 100644 --- a/test/js/samples/legacy-input-type/expected-bundle.js +++ b/test/js/samples/legacy-input-type/expected-bundle.js @@ -161,7 +161,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/legacy-quote-class/expected-bundle.js b/test/js/samples/legacy-quote-class/expected-bundle.js index 09b00d11ea..499a82c46e 100644 --- a/test/js/samples/legacy-quote-class/expected-bundle.js +++ b/test/js/samples/legacy-quote-class/expected-bundle.js @@ -178,7 +178,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/media-bindings/expected-bundle.js b/test/js/samples/media-bindings/expected-bundle.js index 9394167dca..fdf8a4f755 100644 --- a/test/js/samples/media-bindings/expected-bundle.js +++ b/test/js/samples/media-bindings/expected-bundle.js @@ -171,7 +171,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/non-imported-component/expected-bundle.js b/test/js/samples/non-imported-component/expected-bundle.js index 9c14fc4a20..f8e0722db7 100644 --- a/test/js/samples/non-imported-component/expected-bundle.js +++ b/test/js/samples/non-imported-component/expected-bundle.js @@ -157,7 +157,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/onrender-onteardown-rewritten/expected-bundle.js b/test/js/samples/onrender-onteardown-rewritten/expected-bundle.js index c1af671858..e53dd0de5e 100644 --- a/test/js/samples/onrender-onteardown-rewritten/expected-bundle.js +++ b/test/js/samples/onrender-onteardown-rewritten/expected-bundle.js @@ -143,7 +143,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { @@ -197,13 +197,13 @@ function SvelteComponent(options) { var _oncreate = oncreate.bind(this); if (!options.root) { - this._oncreate = [_oncreate]; - } else { - this.root._oncreate.push(_oncreate); - } + this._oncreate = []; + } this._fragment = create_main_fragment(this._state, this); + this.root._oncreate.push(_oncreate); + if (options.target) { this._fragment.c(); this._fragment.m(options.target, options.anchor || null); diff --git a/test/js/samples/onrender-onteardown-rewritten/expected.js b/test/js/samples/onrender-onteardown-rewritten/expected.js index 4cb3ad1f6f..51763c0b00 100644 --- a/test/js/samples/onrender-onteardown-rewritten/expected.js +++ b/test/js/samples/onrender-onteardown-rewritten/expected.js @@ -29,13 +29,13 @@ function SvelteComponent(options) { var _oncreate = oncreate.bind(this); if (!options.root) { - this._oncreate = [_oncreate]; - } else { - this.root._oncreate.push(_oncreate); - } + this._oncreate = []; + } this._fragment = create_main_fragment(this._state, this); + this.root._oncreate.push(_oncreate); + if (options.target) { this._fragment.c(); this._fragment.m(options.target, options.anchor || null); diff --git a/test/js/samples/setup-method/expected-bundle.js b/test/js/samples/setup-method/expected-bundle.js index 5e7b3ffc8b..58ee3a67a0 100644 --- a/test/js/samples/setup-method/expected-bundle.js +++ b/test/js/samples/setup-method/expected-bundle.js @@ -143,7 +143,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/svg-title/expected-bundle.js b/test/js/samples/svg-title/expected-bundle.js index 7a56846bc1..12f06bcf92 100644 --- a/test/js/samples/svg-title/expected-bundle.js +++ b/test/js/samples/svg-title/expected-bundle.js @@ -163,7 +163,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/title/expected-bundle.js b/test/js/samples/title/expected-bundle.js index a243c637f1..6eb3471b5b 100644 --- a/test/js/samples/title/expected-bundle.js +++ b/test/js/samples/title/expected-bundle.js @@ -143,7 +143,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/use-elements-as-anchors/expected-bundle.js b/test/js/samples/use-elements-as-anchors/expected-bundle.js index 837a7e4275..e2ee1e61fb 100644 --- a/test/js/samples/use-elements-as-anchors/expected-bundle.js +++ b/test/js/samples/use-elements-as-anchors/expected-bundle.js @@ -167,7 +167,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) { diff --git a/test/js/samples/window-binding-scroll/expected-bundle.js b/test/js/samples/window-binding-scroll/expected-bundle.js index 43760c21f0..a8a932c8b7 100644 --- a/test/js/samples/window-binding-scroll/expected-bundle.js +++ b/test/js/samples/window-binding-scroll/expected-bundle.js @@ -163,7 +163,7 @@ function _set(newState) { } function callAll(fns) { - while (fns && fns.length) fns.pop()(); + while (fns && fns.length) fns.shift()(); } function _mount(target, anchor) {