I am creating unit tests for polymer project . I am trying to see if there is a way of accessing functions inside polymer html file. My control has a paper input and a function formats the user input. My question is how can I access the function:
<test-fixture id="custom control">
<template>
<custom control id="formatInput"></custom control>
</template>
<script>
suite('<custom-control>', function () {
var formatInput
setup(function () {
formatInput = fixture('custom-control');
});
test('check format', function () {
formatInput.value = ‘Hello!';
var formatValue = formatInput.format(formatInput.value );
}
);
});
</script>
Aucun commentaire:
Enregistrer un commentaire