From 0a37190ffe73b7df9fa656db9263af20a3c46532 Mon Sep 17 00:00:00 2001 From: Nguyen Tran Date: Tue, 25 Apr 2023 16:46:49 -0400 Subject: [PATCH] Update validate slot position js tests --- test/js/samples/capture-inject-state/expected.js | 4 ++-- test/js/samples/debug-empty/expected.js | 2 +- test/js/samples/debug-foo-bar-baz-things/expected.js | 2 +- test/js/samples/debug-foo/expected.js | 2 +- test/js/samples/debug-hoisted/expected.js | 2 +- test/js/samples/dev-warning-missing-data-computed/expected.js | 2 +- test/js/samples/loop-protect/expected.js | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/js/samples/capture-inject-state/expected.js b/test/js/samples/capture-inject-state/expected.js index 41f9b966b0..d3e81b5f12 100644 --- a/test/js/samples/capture-inject-state/expected.js +++ b/test/js/samples/capture-inject-state/expected.js @@ -106,13 +106,13 @@ function instance($$self, $$props, $$invalidate) { $$self.$$.on_destroy.push(() => $$unsubscribe_prop()); let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('Component', slots, []); let { prop } = $$props; validate_store(prop, 'prop'); $$subscribe_prop(); let { alias: realName } = $$props; let local; let shadowedByModule; + validate_slots('Component', slots, []); $$self.$$.on_mount.push(function () { if (prop === undefined && !('prop' in $$props || $$self.$$.bound[$$self.$$.props['prop']])) { @@ -197,4 +197,4 @@ class Component extends SvelteComponentDev { } export default Component; -export { moduleLiveBinding, moduleConstantProps }; +export { moduleLiveBinding, moduleConstantProps }; \ No newline at end of file diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index ee304591cb..90de3953c3 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -70,8 +70,8 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('Component', slots, []); let { name } = $$props; + validate_slots('Component', slots, []); $$self.$$.on_mount.push(function () { if (name === undefined && !('name' in $$props || $$self.$$.bound[$$self.$$.props['name']])) { 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 0b0a41abe2..1b8a323194 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -173,11 +173,11 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('Component', slots, []); let { things } = $$props; let { foo } = $$props; let { bar } = $$props; let { baz } = $$props; + validate_slots('Component', slots, []); $$self.$$.on_mount.push(function () { if (things === undefined && !('things' in $$props || $$self.$$.bound[$$self.$$.props['things']])) { diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 637a229a97..e9bc5b4a14 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -167,9 +167,9 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('Component', slots, []); let { things } = $$props; let { foo } = $$props; + validate_slots('Component', slots, []); $$self.$$.on_mount.push(function () { if (things === undefined && !('things' in $$props || $$self.$$.bound[$$self.$$.props['things']])) { diff --git a/test/js/samples/debug-hoisted/expected.js b/test/js/samples/debug-hoisted/expected.js index 9fc4f7cf4f..8245e6420a 100644 --- a/test/js/samples/debug-hoisted/expected.js +++ b/test/js/samples/debug-hoisted/expected.js @@ -50,9 +50,9 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('Component', slots, []); let obj = { x: 5 }; let kobzol = 5; + validate_slots('Component', slots, []); const writable_props = []; Object.keys($$props).forEach(key => { 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 a94cf7b5f2..6d47b9bb9c 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -66,9 +66,9 @@ function create_fragment(ctx) { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('Component', slots, []); let { foo } = $$props; let bar; + validate_slots('Component', slots, []); $$self.$$.on_mount.push(function () { if (foo === undefined && !('foo' in $$props || $$self.$$.bound[$$self.$$.props['foo']])) { diff --git a/test/js/samples/loop-protect/expected.js b/test/js/samples/loop-protect/expected.js index 04033d0d95..98b8133a9e 100644 --- a/test/js/samples/loop-protect/expected.js +++ b/test/js/samples/loop-protect/expected.js @@ -68,7 +68,6 @@ function foo() { function instance($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('Component', slots, []); let node; { @@ -107,6 +106,7 @@ function instance($$self, $$props, $$invalidate) { } while (true); } + validate_slots('Component', slots, []); const writable_props = []; Object.keys($$props).forEach(key => {