+
+
+ scroll y is {$y}. {$y} * {$y} = {$y_squared}
+
+
+
+
+
\ No newline at end of file
diff --git a/test/runtime/samples/window-binding-scroll-store/_config.js b/test/runtime/samples/window-binding-scroll-store/_config.js
new file mode 100644
index 0000000000..abddb86765
--- /dev/null
+++ b/test/runtime/samples/window-binding-scroll-store/_config.js
@@ -0,0 +1,31 @@
+export default {
+ skip_if_ssr: true,
+
+ async test({ assert, component, target, window }) {
+ assert.equal(window.pageYOffset, 0);
+
+ const event = new window.Event('scroll');
+ Object.defineProperties(window, {
+ pageYOffset: {
+ value: 234,
+ configurable: true,
+ },
+ });
+
+ await window.dispatchEvent(event);
+
+ assert.htmlEqual(
+ target.innerHTML,
+ `scroll\ny\nis\n234.\n234\n*\n234\n=\n54756
`
+ );
+ },
+
+ after_test() {
+ Object.defineProperties(window, {
+ pageYOffset: {
+ value: 0,
+ configurable: true,
+ },
+ });
+ },
+};
diff --git a/test/runtime/samples/window-binding-scroll-store/main.svelte b/test/runtime/samples/window-binding-scroll-store/main.svelte
new file mode 100644
index 0000000000..fe225520d7
--- /dev/null
+++ b/test/runtime/samples/window-binding-scroll-store/main.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+
+ scroll y is {$y}. {$y} * {$y} = {$y_squared}
+
+
+
+
+
\ No newline at end of file