0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
svelte/test/hydration/samples/dynamic-text/_config.js
2017-06-14 16:34:12 -04:00

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