mirror of https://github.com/sveltejs/svelte
parent
bfba232dac
commit
c7e7ea6ad1
@ -1,15 +1,15 @@
|
|||||||
export default {
|
export default {
|
||||||
props: { text: "first" },
|
props: { text: 'first' },
|
||||||
test({ assert, target, component }) {
|
test({ assert, target, component }) {
|
||||||
assert.htmlEqual(target.innerHTML, "<button>first</button>");
|
assert.htmlEqual(target.innerHTML, '<button>first</button>');
|
||||||
component.text = "second";
|
component.text = 'second';
|
||||||
assert.htmlEqual(target.innerHTML, "<button>second</button>");
|
assert.htmlEqual(target.innerHTML, '<button>second</button>');
|
||||||
let last_text;
|
let last_text;
|
||||||
component.text = "third";
|
component.text = 'third';
|
||||||
component.on_destroy = (text) => {
|
component.on_destroy = (text) => {
|
||||||
last_text = text;
|
last_text = text;
|
||||||
};
|
};
|
||||||
component.$destroy();
|
component.$destroy();
|
||||||
assert.equal(last_text, "third");
|
assert.equal(last_text, 'third');
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in new issue