mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
basic test for computed expression containing literal args (must also contain at least one push dependency at this time)
This commit is contained in:
committed by
Kevin Schaaf
parent
69c472fe9a
commit
3fd8fbb973
@@ -13,7 +13,9 @@
|
||||
style$="{{boundStyle}}"
|
||||
data-id$="{{dataSetId}}"
|
||||
custom-event-value="{{customEventValue::custom}}"
|
||||
custom-event-object-value="{{customEventObject.value::change}}">
|
||||
custom-event-object-value="{{customEventObject.value::change}}"
|
||||
computed-from-mixed-literals='{{computeFromLiterals(3, "foo", bool)}}'
|
||||
>
|
||||
Test
|
||||
</div>
|
||||
<span id="boundText">{{text}}</span>
|
||||
@@ -82,7 +84,7 @@
|
||||
}
|
||||
},
|
||||
observers: [
|
||||
'multipleDepChangeHandler(dep1 dep2 dep3)',
|
||||
'multipleDepChangeHandler(dep1, dep2, dep3)',
|
||||
'customEventObjectValueChanged(customEventObject.value)'
|
||||
],
|
||||
created: function() {
|
||||
@@ -184,6 +186,11 @@
|
||||
assert.equal(arguments.length, 1, 'observer argument length wrong');
|
||||
assert.equal(val, this.customEventObject.value, 'observer value argument wrong');
|
||||
// note, no `old` argument for path observers
|
||||
},
|
||||
computeFromLiterals: function(num, str) {
|
||||
assert.equal(num, 3);
|
||||
assert.equal(str, 'foo');
|
||||
return num + str;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user