0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

failing tests for #637

This commit is contained in:
Rich Harris 2017-08-29 21:35:02 -04:00
parent 835a48bec5
commit a197c18523
12 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,10 @@
export default {
data: {
raw: `<span>foo</span>`
},
test ( assert, component, target ) {
const span = target.querySelector('span');
assert.equal(!span.previousSibling);
}
};

View File

@ -0,0 +1 @@
<div>{{{raw}}}{{#if maybe}}after{{/if}}</div>

View File

@ -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);
}
};

View File

@ -0,0 +1 @@
<div>{{{raw}}}</div>

View File

@ -0,0 +1,10 @@
export default {
data: {
raw: `<span>foo</span>`
},
test ( assert, component, target ) {
const span = target.querySelector('span');
assert.equal(!span.nextSibling);
}
};

View File

@ -0,0 +1 @@
<div>{{#if maybe}}after{{/if}}{{{raw}}}</div>

View File

@ -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');
}
};

View File

@ -0,0 +1 @@
before<br>{{{raw}}}<br>after

View File

@ -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');
}
};

View File

@ -0,0 +1 @@
before<br>{{{raw}}}{{#if maybe}}after{{/if}}

View File

@ -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');
}
};

View File

@ -0,0 +1 @@
before<br>{{{raw}}}{{#if maybe}}after{{/if}}