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.
svelte/test/hydration/samples/dynamic-text-changed/_config.js

22 lines
332 B

export default {
props: {
name: 'everybody'
},
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);
}
};