mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
27 lines
804 B
JavaScript
27 lines
804 B
JavaScript
var expect = require("chai").expect;
|
|
|
|
module.exports = function (helpers) {
|
|
var component = helpers.mount(require.resolve("./index.marko"));
|
|
|
|
var firstCheckbox = component.getEl("first");
|
|
var secondCheckbox = component.getEl("second");
|
|
|
|
expect(firstCheckbox.checked).to.equal(true);
|
|
expect(secondCheckbox.checked).to.equal(false);
|
|
|
|
helpers.triggerMouseEvent(firstCheckbox, "click");
|
|
|
|
expect(firstCheckbox.checked).to.equal(false);
|
|
expect(secondCheckbox.checked).to.equal(false);
|
|
|
|
helpers.triggerMouseEvent(firstCheckbox, "click");
|
|
|
|
expect(firstCheckbox.checked).to.equal(true);
|
|
expect(secondCheckbox.checked).to.equal(false);
|
|
|
|
helpers.triggerMouseEvent(secondCheckbox, "click");
|
|
|
|
expect(firstCheckbox.checked).to.equal(true);
|
|
expect(secondCheckbox.checked).to.equal(true);
|
|
};
|