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/runtime/samples/key-block/_config.js

18 lines
655 B

export default {
html: '<div>0</div><div>0</div>',
async test({ assert, component, target, window }) {
let [div1, div2] = target.querySelectorAll('div');
component.value = 5;
assert.htmlEqual(target.innerHTML, '<div>5</div><div>0</div>');
assert.notStrictEqual(div1, target.querySelectorAll('div')[0]);
assert.strictEqual(div2, target.querySelectorAll('div')[1]);
[div1, div2] = target.querySelectorAll('div');
component.reactive = 10;
assert.htmlEqual(target.innerHTML, '<div>5</div><div>10</div>');
assert.strictEqual(div1, target.querySelectorAll('div')[0]);
assert.strictEqual(div2, target.querySelectorAll('div')[1]);
}
};