Skip to content

Commit

Permalink
failing tests for #637
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 30, 2017
1 parent 835a48b commit a197c18
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/runtime/samples/raw-anchor-first-child/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default {
data: {
raw: `<span>foo</span>`
},

test ( assert, component, target ) {
const span = target.querySelector('span');
assert.equal(!span.previousSibling);
}
};
1 change: 1 addition & 0 deletions test/runtime/samples/raw-anchor-first-child/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>{{{raw}}}{{#if maybe}}after{{/if}}</div>
11 changes: 11 additions & 0 deletions test/runtime/samples/raw-anchor-first-last-child/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
data: {
raw: `<span>foo</span>`
},

test ( assert, component, target ) {
const span = target.querySelector('span');
assert.equal(!span.previousSibling);
assert.equal(!span.nextSibling);
}
};
1 change: 1 addition & 0 deletions test/runtime/samples/raw-anchor-first-last-child/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>{{{raw}}}</div>
10 changes: 10 additions & 0 deletions test/runtime/samples/raw-anchor-last-child/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default {
data: {
raw: `<span>foo</span>`
},

test ( assert, component, target ) {
const span = target.querySelector('span');
assert.equal(!span.nextSibling);
}
};
1 change: 1 addition & 0 deletions test/runtime/samples/raw-anchor-last-child/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>{{#if maybe}}after{{/if}}{{{raw}}}</div>
11 changes: 11 additions & 0 deletions test/runtime/samples/raw-anchor-next-previous-sibling/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
data: {
raw: `<span>foo</span>`
},

test ( assert, component, target ) {
const span = target.querySelector('span');
assert.equal(span.previousSibling.nodeName, 'BR');
assert.equal(span.nextSibling.nodeName, 'BR');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
before<br>{{{raw}}}<br>after
10 changes: 10 additions & 0 deletions test/runtime/samples/raw-anchor-next-sibling/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default {
data: {
raw: `<span>foo</span>`
},

test ( assert, component, target ) {
const span = target.querySelector('span');
assert.equal(span.previousSibling.nodeName, 'BR');
}
};
1 change: 1 addition & 0 deletions test/runtime/samples/raw-anchor-next-sibling/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
before<br>{{{raw}}}{{#if maybe}}after{{/if}}
10 changes: 10 additions & 0 deletions test/runtime/samples/raw-anchor-previous-sibling/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default {
data: {
raw: `<span>foo</span>`
},

test ( assert, component, target ) {
const span = target.querySelector('span');
assert.equal(span.previousSibling.nodeName, 'BR');
}
};
1 change: 1 addition & 0 deletions test/runtime/samples/raw-anchor-previous-sibling/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
before<br>{{{raw}}}{{#if maybe}}after{{/if}}

0 comments on commit a197c18

Please sign in to comment.