mirror of https://github.com/sveltejs/svelte
Merge pull request #755 from sveltejs/gh-744
handle set after destroy, and move destroy into shared helperspull/754/merge
commit
8b9380fb24
@ -1,7 +1,7 @@
|
||||
export default {
|
||||
test ( assert, component ) {
|
||||
assert.deepEqual( component.events, [ 'render' ]);
|
||||
test(assert, component) {
|
||||
assert.deepEqual(component.events, ['create']);
|
||||
component.destroy();
|
||||
assert.deepEqual( component.events, [ 'render', 'teardown' ]);
|
||||
assert.deepEqual(component.events, ['create', 'destroy']);
|
||||
}
|
||||
};
|
||||
|
@ -0,0 +1,10 @@
|
||||
export default {
|
||||
data: {
|
||||
x: 1
|
||||
},
|
||||
|
||||
test(assert, component) {
|
||||
component.destroy();
|
||||
component.set({ x: 2 });
|
||||
}
|
||||
};
|
@ -0,0 +1 @@
|
||||
<div>{{x}}</div>
|
Loading…
Reference in new issue