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

16 lines
461 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</div>');
assert.strictEqual(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'));
}
};