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.
32 lines
524 B
32 lines
524 B
7 years ago
|
export default {
|
||
|
data: {
|
||
|
things: {
|
||
|
foo: [
|
||
|
'animal',
|
||
|
'vegetable',
|
||
|
'mineral'
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
|
||
|
snapshot(target) {
|
||
|
const ul = target.querySelector('ul');
|
||
|
const lis = ul.querySelectorAll('li');
|
||
|
|
||
|
return {
|
||
|
ul,
|
||
|
lis
|
||
|
};
|
||
|
},
|
||
|
|
||
|
test(assert, target, snapshot) {
|
||
|
const ul = target.querySelector('ul');
|
||
|
const lis = ul.querySelectorAll('li');
|
||
|
|
||
|
assert.equal(ul, snapshot.ul);
|
||
|
assert.equal(lis[0], snapshot.lis[0]);
|
||
|
assert.equal(lis[1], snapshot.lis[1]);
|
||
|
assert.equal(lis[2], snapshot.lis[2]);
|
||
|
}
|
||
|
};
|