Skip to content

Commit

Permalink
add regression test for missing class on elem with bind and spread (#…
Browse files Browse the repository at this point in the history
…3668)

relates to #2707
  • Loading branch information
mtlewis authored and Conduitry committed Oct 24, 2019
1 parent 0419039 commit af0557a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/runtime/samples/class-with-spread-and-bind/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default {
props: {
primary: true,
},

html: `<div class="test-class primary" role="button"></div>`,

test({ assert, component, target, window }) {
component.primary = true;

assert.htmlEqual(
target.innerHTML,
`
<div class="test-class primary" role="button"></div>
`
);
},
};
11 changes: 11 additions & 0 deletions test/runtime/samples/class-with-spread-and-bind/main.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script>
let primary = true;
let elem;
</script>

<div
bind:this={elem}
class="test-class"
class:primary
{...{ role: 'button' }}
></div>

0 comments on commit af0557a

Please sign in to comment.