mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
326 B
21 lines
326 B
7 years ago
|
export default {
|
||
|
data: {
|
||
|
name: 'world'
|
||
|
},
|
||
|
|
||
|
snapshot(target) {
|
||
|
const h1 = target.querySelector('h1');
|
||
|
|
||
|
return {
|
||
|
h1,
|
||
|
text: h1.childNodes[0]
|
||
|
};
|
||
|
},
|
||
|
|
||
|
test(assert, target, snapshot) {
|
||
|
const h1 = target.querySelector('h1');
|
||
|
|
||
|
assert.equal(h1, snapshot.h1);
|
||
|
assert.equal(h1.childNodes[0], snapshot.text);
|
||
|
}
|
||
|
};
|