From 46d0d129b73d3ae52457ef0c9c691d7aa3bc5dfa Mon Sep 17 00:00:00 2001 From: Bassam Ismail Date: Tue, 23 Jun 2020 20:45:13 +0530 Subject: [PATCH] fix(5019): add tests to validate store is hoisted --- test/runtime/samples/store-imports-hoisted/_config.js | 7 +++++++ test/runtime/samples/store-imports-hoisted/foo.js | 3 +++ test/runtime/samples/store-imports-hoisted/main.svelte | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100644 test/runtime/samples/store-imports-hoisted/_config.js create mode 100644 test/runtime/samples/store-imports-hoisted/foo.js create mode 100644 test/runtime/samples/store-imports-hoisted/main.svelte diff --git a/test/runtime/samples/store-imports-hoisted/_config.js b/test/runtime/samples/store-imports-hoisted/_config.js new file mode 100644 index 0000000000..251866e5ba --- /dev/null +++ b/test/runtime/samples/store-imports-hoisted/_config.js @@ -0,0 +1,7 @@ +export default { + compileOptions: { dev: true }, // tests `@validate_store` code generation + + html: ` +

42

+ ` +}; \ No newline at end of file diff --git a/test/runtime/samples/store-imports-hoisted/foo.js b/test/runtime/samples/store-imports-hoisted/foo.js new file mode 100644 index 0000000000..5d15213c3a --- /dev/null +++ b/test/runtime/samples/store-imports-hoisted/foo.js @@ -0,0 +1,3 @@ +import { writable } from '../../../../store'; + +export default writable(42); \ No newline at end of file diff --git a/test/runtime/samples/store-imports-hoisted/main.svelte b/test/runtime/samples/store-imports-hoisted/main.svelte new file mode 100644 index 0000000000..223572962e --- /dev/null +++ b/test/runtime/samples/store-imports-hoisted/main.svelte @@ -0,0 +1,7 @@ + + +

{answer}