Skip to content

Commit

Permalink
#94@trivial: Fixes unit tests in server-rendering package.
Browse files Browse the repository at this point in the history
  • Loading branch information
capricorn86 committed Oct 6, 2020
1 parent f32acf8 commit c735977
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('HappyDOMServerRenderer', () => {
div.appendChild(span);

expect(new HappyDOMServerRenderer().getOuterHTML(div).html).toBe(
'<div attr1="value1" attr2="value2" attr3><span attr1="value1" attr2="value2" attr3></span></div>'
'<div attr1="value1" attr2="value2" attr3=""><span attr1="value1" attr2="value2" attr3=""></span></div>'
);
});

Expand Down Expand Up @@ -79,7 +79,7 @@ describe('HappyDOMServerRenderer', () => {
div.appendChild(span1);

expect(new HappyDOMServerRenderer().getOuterHTML(div).html).toBe(
'<div><!--Comment 1.-->Text 1.<!--Comment 2.-->Text 2.<span attr1="value1" attr2="value2" attr3><span attr1="value1">Text 3.</span></span></div>'
'<div><!--Comment 1.-->Text 1.<!--Comment 2.-->Text 2.<span attr1="value1" attr2="value2" attr3=""><span attr1="value1">Text 3.</span></span></div>'
);
});

Expand All @@ -97,7 +97,7 @@ describe('HappyDOMServerRenderer', () => {
document.body.appendChild(div);

expect(new HappyDOMServerRenderer().getOuterHTML(div).html).toBe(
'<div><mocked-html-element attr1="value1" attr2="value2" attr3></mocked-html-element></div>'
'<div><mocked-html-element attr1="value1" attr2="value2" attr3=""></mocked-html-element></div>'
);
});

Expand All @@ -123,7 +123,7 @@ describe('HappyDOMServerRenderer', () => {
expect(result.html.replace(/\s/gm, '')).toBe(
`
<div>
<mocked-html-element attr1=\"value1\" attr2=\"value2\" attr3>
<mocked-html-element attr1=\"value1\" attr2=\"value2\" attr3="">
<style>
:host {
display: block;
Expand Down Expand Up @@ -183,7 +183,7 @@ describe('HappyDOMServerRenderer', () => {
expect(result.html.replace(/\s/gm, '')).toBe(
`
<div>
<mocked-html-element attr1=\"value1\" attr2=\"value2\" attr3 class="a">
<mocked-html-element attr1="value1" attr2="value2" attr3="" class="a">
<style class="a">
mocked-html-element.a {
display: block
Expand All @@ -201,11 +201,11 @@ describe('HappyDOMServerRenderer', () => {
color: green
}
.class1.a.a[attr1=\"value1\"] {
.class1.a.a[attr1="value1"] {
color: yellow
}
.a[attr1=\"value1\"] {
.a[attr1="value1"] {
color: yellow
}
</style>
Expand Down Expand Up @@ -245,7 +245,7 @@ describe('HappyDOMServerRenderer', () => {
expect(result.html.replace(/\s/gm, '')).toBe(
`
<div>
<mocked-html-element attr1=\"value1\" attr2=\"value2\" attr3 class="a">
<mocked-html-element attr1="value1" attr2="value2" attr3="" class="a">
<div class="a">
<span class="a">
Some text.
Expand Down

0 comments on commit c735977

Please sign in to comment.