mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
19 lines
453 B
JavaScript
19 lines
453 B
JavaScript
var expect = require("chai").expect;
|
|
|
|
module.exports = function (helpers) {
|
|
var component = helpers.mount(require.resolve("./index"), {});
|
|
|
|
var numTestEventFired = 0;
|
|
|
|
component.handleTestEvent1 = function (a, b) {
|
|
expect(a).to.equal("a");
|
|
expect(b).to.equal("b");
|
|
numTestEventFired++;
|
|
};
|
|
|
|
component.getComponent("bar").emitTestEvent();
|
|
component.getComponent("bar").emitTestEvent();
|
|
|
|
expect(numTestEventFired).to.equal(1);
|
|
};
|