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

19 lines
567 B

export default {
html: '<div>3</div>',
async test({ assert, component, target, window }) {
const div = target.querySelector('div');
await component.mutate();
assert.htmlEqual(target.innerHTML, '<div>5</div>');
assert.strictEqual(div, target.querySelector('div'));
await component.reassign();
assert.htmlEqual(target.innerHTML, '<div>7</div>');
assert.strictEqual(div, target.querySelector('div'));
await component.changeKey();
assert.htmlEqual(target.innerHTML, '<div>7</div>');
assert.notStrictEqual(div, target.querySelector('div'));
}
};