Skip to content

Commit af0557a

Browse files
mtlewisConduitry
authored andcommitted
add regression test for missing class on elem with bind and spread (sveltejs#3668)
relates to sveltejs#2707
1 parent 0419039 commit af0557a

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export default {
2+
props: {
3+
primary: true,
4+
},
5+
6+
html: `<div class="test-class primary" role="button"></div>`,
7+
8+
test({ assert, component, target, window }) {
9+
component.primary = true;
10+
11+
assert.htmlEqual(
12+
target.innerHTML,
13+
`
14+
<div class="test-class primary" role="button"></div>
15+
`
16+
);
17+
},
18+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script>
2+
let primary = true;
3+
let elem;
4+
</script>
5+
6+
<div
7+
bind:this={elem}
8+
class="test-class"
9+
class:primary
10+
{...{ role: 'button' }}
11+
></div>

0 commit comments

Comments
 (0)