mirror of https://github.com/sveltejs/svelte
14 lines
221 B
14 lines
221 B
8 years ago
|
export default {
|
||
8 years ago
|
test ( assert, component ) {
|
||
8 years ago
|
let count = 0;
|
||
|
|
||
8 years ago
|
component.on( 'destroy', function () {
|
||
8 years ago
|
assert.equal( this, component );
|
||
|
count += 1;
|
||
|
});
|
||
|
|
||
8 years ago
|
component.destroy();
|
||
8 years ago
|
assert.equal( count, 1 );
|
||
|
}
|
||
|
};
|