test custom events

pull/31/head
Rich-Harris 8 years ago
parent 6eeff1960c
commit abd8b77106

@ -0,0 +1,19 @@
import * as assert from 'assert';
export default {
test ( component ) {
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 );
component.teardown();
}
};
Loading…
Cancel
Save