mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
21 lines
326 B
JavaScript
21 lines
326 B
JavaScript
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);
|
|
}
|
|
}; |