From 772fb96d14304d2667c73d13c2deab73dae67c2d Mon Sep 17 00:00:00 2001 From: paoloricciuti Date: Wed, 13 Aug 2025 16:35:22 +0200 Subject: [PATCH] chore: failing test for legacy api broken with HRM --- .../compatibility-hmr-methods/_config.js | 18 ++++++++++++++++++ .../compatibility-hmr-methods/main.svelte | 15 +++++++++++++++ .../compatibility-hmr-methods/test.svelte | 7 +++++++ 3 files changed, 40 insertions(+) create mode 100644 packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/_config.js create mode 100644 packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/main.svelte create mode 100644 packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/test.svelte diff --git a/packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/_config.js b/packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/_config.js new file mode 100644 index 0000000000..338e085e83 --- /dev/null +++ b/packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/_config.js @@ -0,0 +1,18 @@ +import { ok, test } from '../../test'; +import { flushSync } from 'svelte'; + +export default test({ + compileOptions: { + hmr: true, + compatibility: { + componentApi: 4 + } + }, + + async test({ assert, target, logs }) { + const btn = target.querySelector('button'); + btn?.click(); + + assert.deepEqual(logs, ['event']); + } +}); diff --git a/packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/main.svelte b/packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/main.svelte new file mode 100644 index 0000000000..eb5db5baf6 --- /dev/null +++ b/packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/main.svelte @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/test.svelte b/packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/test.svelte new file mode 100644 index 0000000000..080a514fb9 --- /dev/null +++ b/packages/svelte/tests/runtime-runes/samples/compatibility-hmr-methods/test.svelte @@ -0,0 +1,7 @@ + + + \ No newline at end of file