mirror of https://github.com/sveltejs/svelte
18 lines
280 B
18 lines
280 B
8 years ago
|
export default {
|
||
8 years ago
|
test ( assert, component ) {
|
||
8 years ago
|
let count = 0;
|
||
|
|
||
|
const expected = { x: 1 };
|
||
|
|
||
|
component.on( 'foo', data => {
|
||
|
assert.equal( data, expected );
|
||
|
count += 1;
|
||
|
});
|
||
|
|
||
|
component.fire( 'foo', expected );
|
||
|
assert.equal( count, 1 );
|
||
|
|
||
8 years ago
|
component.destroy();
|
||
8 years ago
|
}
|
||
|
};
|