Skip to content

Commit

Permalink
add failing test for missing class on elem with bind and spread
Browse files Browse the repository at this point in the history
relates to sveltejs#2707
  • Loading branch information
mtlewis committed Oct 6, 2019
1 parent def7765 commit b1eb083
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 b1eb083

Please sign in to comment.