Skip to content

Commit

Permalink
remove unnecessary test
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Oct 13, 2022
1 parent 1e1f020 commit 022a1d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
export default {
html: `
<h1 class="svelte-szzkfu" style="background-color: red;">hello</h1>
<h1 class="svelte-szzkfu">hello</h1>
<h1 class="svelte-szzkfu" style="background-color: red !important;">hello</h1>
`,

ssrHtml: `
<h1 class="svelte-szzkfu" style="background-color: red;">hello</h1>
<h1 class="svelte-szzkfu" style="background-color: red important;">hello</h1>
<h1 class="svelte-szzkfu" style="background-color: red !important;">hello</h1>
`,

test({ assert, target, window, component }) {
const h1s = target.querySelectorAll('h1');

assert.equal(window.getComputedStyle(h1s[0])['backgroundColor'], 'rgb(0, 0, 255)');
assert.equal(window.getComputedStyle(h1s[1])['backgroundColor'], 'rgb(0, 0, 255)');
assert.equal(window.getComputedStyle(h1s[2])['backgroundColor'], 'rgb(255, 0, 0)');
assert.equal(window.getComputedStyle(h1s[1])['backgroundColor'], 'rgb(255, 0, 0)');

component.color = 'yellow';
assert.equal(window.getComputedStyle(h1s[0])['backgroundColor'], 'rgb(0, 0, 255)');
assert.equal(window.getComputedStyle(h1s[1])['backgroundColor'], 'rgb(0, 0, 255)');
assert.equal(window.getComputedStyle(h1s[2])['backgroundColor'], 'rgb(255, 255, 0)');
assert.equal(window.getComputedStyle(h1s[1])['backgroundColor'], 'rgb(255, 255, 0)');
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
</script>

<h1 style:background-color={color} >hello</h1>
<h1 style:background-color="{color} important">hello</h1>
<h1 style:background-color|important="{color}">hello</h1>

<style>
Expand Down

0 comments on commit 022a1d1

Please sign in to comment.