import { expect } from 'chai';

class {
    onMount() {
        var components = window.components || (window.components = {});
        components['one-arg-array'] = this;
    }

	handleColorClick(color) {
		this.color = color[0];
	}

    test(helpers) {
        var liEls = this.el.querySelectorAll('li');

        helpers.triggerMouseEvent(liEls[0], 'click');
        expect(this.color).to.equal('red');

        helpers.triggerMouseEvent(liEls[1], 'click');
        expect(this.color).to.equal('green');

        helpers.triggerMouseEvent(liEls[2], 'click');
        expect(this.color).to.equal('blue');
    };
}

<div>
    <ul>
        <li for(color in input.colors) onClick("handleColorClick", [color])>
			${color}
		</li>
    </ul>
</div>
