All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.polymer.public.bower_components.iron-test-helpers.README.md Maven / Gradle / Ivy

There is a newer version: 1.9.3.1
Show newest version
# iron-test-helpers

Utility classes to make testing easier.

## Mock Interactions

This is a set of methods to simulate mouse or keyboard interaction with an element. Include `mock-interactions.js` and then use them like so:

```javascript
test('can be triggered with space', function(done) {
  button.addEventListener('keydown', function() {
    done();
  });
  MockInteractions.pressSpace(button);
});

test('can be clicked', function(done) {
  button.addEventListener('click', function() {
    done();
  });
  MockInteractions.down(button);
});
```




© 2015 - 2025 Weber Informatics LLC | Privacy Policy