From b1eb0839c73d9a54d4cbb0b8814d58b782582d19 Mon Sep 17 00:00:00 2001 From: Mike Lewis Date: Sun, 6 Oct 2019 18:35:33 +0100 Subject: [PATCH] add failing test for missing class on elem with bind and spread relates to #2707 --- .../class-with-spread-and-bind/_config.js | 18 ++++++++++++++++++ .../class-with-spread-and-bind/main.svelte | 11 +++++++++++ 2 files changed, 29 insertions(+) create mode 100644 test/runtime/samples/class-with-spread-and-bind/_config.js create mode 100644 test/runtime/samples/class-with-spread-and-bind/main.svelte diff --git a/test/runtime/samples/class-with-spread-and-bind/_config.js b/test/runtime/samples/class-with-spread-and-bind/_config.js new file mode 100644 index 000000000000..f3c54e8c525a --- /dev/null +++ b/test/runtime/samples/class-with-spread-and-bind/_config.js @@ -0,0 +1,18 @@ +export default { + props: { + primary: true, + }, + + html: `
`, + + test({ assert, component, target, window }) { + component.primary = true; + + assert.htmlEqual( + target.innerHTML, + ` +
+ ` + ); + }, +}; diff --git a/test/runtime/samples/class-with-spread-and-bind/main.svelte b/test/runtime/samples/class-with-spread-and-bind/main.svelte new file mode 100644 index 000000000000..c7c24a2e7bc4 --- /dev/null +++ b/test/runtime/samples/class-with-spread-and-bind/main.svelte @@ -0,0 +1,11 @@ + + +