Blame view

bower_components/iron-test-helpers/README.md 552 Bytes
73bcce88   luigser   COMPONENTS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  # 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.tap(button);
  });
  ```