I have a Polymer 1.0 custom element that has a property of type boolean with default value set to true:
myProperty: {
type: Boolean,
value: true
}
In my unit-test I instantiate this custom element with my-property set to false:
<my-custom-element id="myElem" my-property="false"></my-custom-element>
var elem = document.getElementById('myElem');
test('it_should_set_myProperty_to_false', function () {
assert.equal(elem.myProperty, false);
})
The unit-test is failing. elem.myProperty
is actually set to true when I would expect it to be false. Why is this?