From ef69d10a72e78c7ed9ea1f67d6e762b5162a79e3 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Wed, 22 Sep 2021 16:13:47 -0400 Subject: [PATCH] add test --- .../ChildComponent.svelte | 6 ++++++ .../constructor-prefer-passed-context/_config.js | 6 ++++++ .../constructor-prefer-passed-context/main.svelte | 15 +++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 test/runtime/samples/constructor-prefer-passed-context/ChildComponent.svelte create mode 100644 test/runtime/samples/constructor-prefer-passed-context/_config.js create mode 100644 test/runtime/samples/constructor-prefer-passed-context/main.svelte diff --git a/test/runtime/samples/constructor-prefer-passed-context/ChildComponent.svelte b/test/runtime/samples/constructor-prefer-passed-context/ChildComponent.svelte new file mode 100644 index 0000000000..af77418a1f --- /dev/null +++ b/test/runtime/samples/constructor-prefer-passed-context/ChildComponent.svelte @@ -0,0 +1,6 @@ + + +
Value in child component: {value}
diff --git a/test/runtime/samples/constructor-prefer-passed-context/_config.js b/test/runtime/samples/constructor-prefer-passed-context/_config.js new file mode 100644 index 0000000000..5d5cf9e44a --- /dev/null +++ b/test/runtime/samples/constructor-prefer-passed-context/_config.js @@ -0,0 +1,6 @@ +export default { + skip_if_ssr: true, + html: ` +
Value in child component: undefined
+ ` +}; diff --git a/test/runtime/samples/constructor-prefer-passed-context/main.svelte b/test/runtime/samples/constructor-prefer-passed-context/main.svelte new file mode 100644 index 0000000000..dd051a123a --- /dev/null +++ b/test/runtime/samples/constructor-prefer-passed-context/main.svelte @@ -0,0 +1,15 @@ + + +