mirror of https://github.com/sveltejs/svelte
parent
9e8592ef2c
commit
4a473e3c95
@ -0,0 +1,3 @@
|
||||
<h2>Hello World</h2>
|
||||
<div>xxxxxxx</div><span>yyyy<b>yyyy</b>yyyy</span><p>zzzzzz</p>
|
||||
<p id="p">Bye World</p>
|
||||
@ -0,0 +1,8 @@
|
||||
<h1>Hello World</h1>
|
||||
<!-- HTML_TAG_START -->
|
||||
<div>aaaaaaa</div>
|
||||
<div>bbbbbbb</div>
|
||||
<p>cccccc</p>
|
||||
<span>eeee<b>eee</b>eeee</span>
|
||||
<!-- HTML_TAG_END -->
|
||||
<p id="p">Bye World</p>
|
||||
@ -0,0 +1,15 @@
|
||||
export default {
|
||||
snapshot(target) {
|
||||
const p = target.querySelector('#p');
|
||||
|
||||
return {
|
||||
p
|
||||
};
|
||||
},
|
||||
|
||||
test(assert, target, snapshot) {
|
||||
const p = target.querySelector('#p');
|
||||
|
||||
assert.equal(p, snapshot.p);
|
||||
}
|
||||
};
|
||||
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
const content = `<div>xxxxxxx</div>
|
||||
<span>yyyy<b>yyyy</b>yyyy</span>
|
||||
<p>zzzzzz</p>
|
||||
`;
|
||||
</script>
|
||||
|
||||
<h2>Hello World</h2>
|
||||
{@html content}
|
||||
<p id="p">Bye World</p>
|
||||
@ -0,0 +1,3 @@
|
||||
<h1>Hello World</h1>
|
||||
<div>xxxxxxx</div><span>yyyy<b>yyyy</b>yyyy</span><p>zzzzzz</p>
|
||||
<p id="p">Bye World</p>
|
||||
@ -0,0 +1,8 @@
|
||||
<h1>Hello World</h1>
|
||||
<!-- HTML_TAG_START -->
|
||||
<div>aaaaaaa</div>
|
||||
<div>bbbbbbb</div>
|
||||
<p>cccccc</p>
|
||||
<span>eeee<b>eee</b>eeee</span>
|
||||
<!-- HTML_TAG_END -->
|
||||
<p id="p">Bye World</p>
|
||||
@ -0,0 +1,19 @@
|
||||
export default {
|
||||
snapshot(target) {
|
||||
const p = target.querySelector('#p');
|
||||
const h1 = target.querySelector('h1');
|
||||
|
||||
return {
|
||||
p,
|
||||
h1
|
||||
};
|
||||
},
|
||||
|
||||
test(assert, target, snapshot) {
|
||||
const p = target.querySelector('#p');
|
||||
const h1 = target.querySelector('h1');
|
||||
|
||||
assert.equal(p, snapshot.p);
|
||||
assert.equal(h1, snapshot.h1);
|
||||
}
|
||||
};
|
||||
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
const content = `<div>xxxxxxx</div>
|
||||
<span>yyyy<b>yyyy</b>yyyy</span>
|
||||
<p>zzzzzz</p>
|
||||
`;
|
||||
</script>
|
||||
|
||||
<h1>Hello World</h1>
|
||||
{@html content}
|
||||
<p id="p">Bye World</p>
|
||||
Loading…
Reference in new issue