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-array/_config.js

16 lines
466 B

export default {
html: '<div>1</div>',
async test({ assert, component, target, window }) {
let div = target.querySelector('div');
await component.append(2);
assert.htmlEqual(target.innerHTML, '<div>1,2</div>');
assert.notStrictEqual(div, target.querySelector('div'));
div = target.querySelector('div');
component.array = [3, 4];
assert.htmlEqual(target.innerHTML, '<div>3,4</div>');
assert.notStrictEqual(div, target.querySelector('div'));
}
};