Skip to content

Commit

Permalink
failing test for #288
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Feb 16, 2017
1 parent b847886 commit 96d7814
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/generator/css-space-in-attribute/Widget.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<p class='foo bar'>red on black</p>

<style>
.foo {
color: red;
}

[class*=" bar"] {
background: black;
}
</style>
11 changes: 11 additions & 0 deletions test/generator/css-space-in-attribute/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
test ( assert, component, target, window ) {
const [ control, test ] = target.querySelectorAll( 'p' );

assert.equal( window.getComputedStyle( control ).color, '' );
assert.equal( window.getComputedStyle( control ).backgroundColor, '' );

assert.equal( window.getComputedStyle( test ).color, 'red' );
assert.equal( window.getComputedStyle( test ).backgroundColor, 'black' );
}
};
10 changes: 10 additions & 0 deletions test/generator/css-space-in-attribute/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<p class='foo bar'>control</p>
<Widget/>

<script>
import Widget from './Widget.html';

export default {
components: { Widget }
};
</script>

0 comments on commit 96d7814

Please sign in to comment.