fix snapshot tests

pull/4602/head
Tan Li Hau 6 years ago
parent e36c0b000c
commit 517acc5df6

@ -103,6 +103,8 @@ function instance($$self, $$props, $$invalidate) {
$$subscribe_prop = () => ($$unsubscribe_prop(), $$unsubscribe_prop = subscribe(prop, $$value => $$invalidate(2, $prop = $$value)), prop); $$subscribe_prop = () => ($$unsubscribe_prop(), $$unsubscribe_prop = subscribe(prop, $$value => $$invalidate(2, $prop = $$value)), prop);
$$self.$$.on_destroy.push(() => $$unsubscribe_prop()); $$self.$$.on_destroy.push(() => $$unsubscribe_prop());
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots("Component", slots, []);
let { prop } = $$props; let { prop } = $$props;
validate_store(prop, "prop"); validate_store(prop, "prop");
$$subscribe_prop(); $$subscribe_prop();
@ -115,9 +117,6 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
}); });
let { $$slots = {}, $$scope } = $$props;
validate_slots("Component", $$slots, []);
$$self.$$set = $$props => { $$self.$$set = $$props => {
if ("prop" in $$props) $$subscribe_prop($$invalidate(0, prop = $$props.prop)); if ("prop" in $$props) $$subscribe_prop($$invalidate(0, prop = $$props.prop));
if ("alias" in $$props) $$invalidate(1, realName = $$props.alias); if ("alias" in $$props) $$invalidate(1, realName = $$props.alias);

@ -69,6 +69,8 @@ function create_fragment(ctx) {
} }
function instance($$self, $$props, $$invalidate) { function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots("Component", slots, []);
let { name } = $$props; let { name } = $$props;
const writable_props = ["name"]; const writable_props = ["name"];
@ -76,9 +78,6 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
}); });
let { $$slots = {}, $$scope } = $$props;
validate_slots("Component", $$slots, []);
$$self.$$set = $$props => { $$self.$$set = $$props => {
if ("name" in $$props) $$invalidate(0, name = $$props.name); if ("name" in $$props) $$invalidate(0, name = $$props.name);
}; };

@ -170,6 +170,8 @@ function create_fragment(ctx) {
} }
function instance($$self, $$props, $$invalidate) { function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots("Component", slots, []);
let { things } = $$props; let { things } = $$props;
let { foo } = $$props; let { foo } = $$props;
let { bar } = $$props; let { bar } = $$props;
@ -180,9 +182,6 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
}); });
let { $$slots = {}, $$scope } = $$props;
validate_slots("Component", $$slots, []);
$$self.$$set = $$props => { $$self.$$set = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things); if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo); if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);

@ -164,6 +164,8 @@ function create_fragment(ctx) {
} }
function instance($$self, $$props, $$invalidate) { function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots("Component", slots, []);
let { things } = $$props; let { things } = $$props;
let { foo } = $$props; let { foo } = $$props;
const writable_props = ["things", "foo"]; const writable_props = ["things", "foo"];
@ -172,9 +174,6 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
}); });
let { $$slots = {}, $$scope } = $$props;
validate_slots("Component", $$slots, []);
$$self.$$set = $$props => { $$self.$$set = $$props => {
if ("things" in $$props) $$invalidate(0, things = $$props.things); if ("things" in $$props) $$invalidate(0, things = $$props.things);
if ("foo" in $$props) $$invalidate(1, foo = $$props.foo); if ("foo" in $$props) $$invalidate(1, foo = $$props.foo);

@ -49,6 +49,8 @@ function create_fragment(ctx) {
} }
function instance($$self, $$props, $$invalidate) { function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots("Component", slots, []);
let obj = { x: 5 }; let obj = { x: 5 };
let kobzol = 5; let kobzol = 5;
const writable_props = []; const writable_props = [];
@ -57,8 +59,6 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
}); });
let { $$slots = {}, $$scope } = $$props;
validate_slots("Component", $$slots, []);
$$self.$capture_state = () => ({ obj, kobzol }); $$self.$capture_state = () => ({ obj, kobzol });
$$self.$inject_state = $$props => { $$self.$inject_state = $$props => {

@ -136,14 +136,14 @@ function create_fragment(ctx) {
} }
function instance($$self, $$props) { function instance($$self, $$props) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots("Component", slots, []);
const writable_props = []; const writable_props = [];
Object.keys($$props).forEach(key => { Object.keys($$props).forEach(key => {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
}); });
let { $$slots = {}, $$scope } = $$props;
validate_slots("Component", $$slots, []);
return []; return [];
} }

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { create_ssr_component, debug, each, escape } from "svelte/internal"; import { create_ssr_component, debug, each, escape } from "svelte/internal";
const Component = create_ssr_component(($$result, $$props, $$bindings, $$slots) => { const Component = create_ssr_component(($$result, $$props, $$bindings, slots) => {
let { things } = $$props; let { things } = $$props;
let { foo } = $$props; let { foo } = $$props;
if ($$props.things === void 0 && $$bindings.things && things !== void 0) $$bindings.things(things); if ($$props.things === void 0 && $$bindings.things && things !== void 0) $$bindings.things(things);

@ -65,6 +65,8 @@ function create_fragment(ctx) {
} }
function instance($$self, $$props, $$invalidate) { function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots("Component", slots, []);
let { foo } = $$props; let { foo } = $$props;
let bar; let bar;
const writable_props = ["foo"]; const writable_props = ["foo"];
@ -73,9 +75,6 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Component> was created with unknown prop '${key}'`);
}); });
let { $$slots = {}, $$scope } = $$props;
validate_slots("Component", $$slots, []);
$$self.$$set = $$props => { $$self.$$set = $$props => {
if ("foo" in $$props) $$invalidate(0, foo = $$props.foo); if ("foo" in $$props) $$invalidate(0, foo = $$props.foo);
}; };

@ -67,6 +67,8 @@ function foo() {
} }
function instance($$self, $$props, $$invalidate) { function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots("Component", slots, []);
let node; let node;
{ {
@ -111,9 +113,6 @@ function instance($$self, $$props, $$invalidate) {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console_1.warn(`<Component> was created with unknown prop '${key}'`); if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console_1.warn(`<Component> was created with unknown prop '${key}'`);
}); });
let { $$slots = {}, $$scope } = $$props;
validate_slots("Component", $$slots, []);
function div_binding($$value) { function div_binding($$value) {
binding_callbacks[$$value ? "unshift" : "push"](() => { binding_callbacks[$$value ? "unshift" : "push"](() => {
node = $$value; node = $$value;

@ -15,7 +15,7 @@ function swipe(node, callback) {
} // TODO implement } // TODO implement
const Component = create_ssr_component(($$result, $$props, $$bindings, $$slots) => { const Component = create_ssr_component(($$result, $$props, $$bindings, slots) => {
onMount(() => { onMount(() => {
console.log("onMount"); console.log("onMount");
}); });

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { create_ssr_component } from "svelte/internal"; 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 `<div>content</div> return `<div>content</div>
<div>more content</div>`; <div>more content</div>`;

Loading…
Cancel
Save