# @npm-polymer/iron-test-helpers

> Utility classes to help make testing easier

Latest version **2.0.0** (published 2017-06-03) · http://polymer.github.io/LICENSE.txt license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @npm-polymer/iron-test-helpers
pnpm add @npm-polymer/iron-test-helpers
yarn add @npm-polymer/iron-test-helpers
bun add @npm-polymer/iron-test-helpers
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-06-03 |
| First published | 2017-06-03 |
| Weekly downloads | 0 |
| License | http://polymer.github.io/LICENSE.txt |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | npm-polymer |
| Keywords | web-components, web-component, polymer, test |

## Links

- npm: https://www.npmjs.com/package/@npm-polymer/iron-test-helpers
- Repository: https://github.com/PolymerElements/iron-test-helpers
- Issues: https://github.com/PolymerElements/iron-test-helpers/issues
- npm.io page: https://npm.io/package/@npm-polymer/iron-test-helpers

## Dependencies (1)

- [@npm-polymer/polymer](https://npm.io/package/@npm-polymer/polymer.md) 2.0.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2017-06-03

## README

[![Build status](https://travis-ci.org/PolymerElements/iron-test-helpers.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-test-helpers)

# iron-test-helpers

A set of utility classes to make testing easier. For more details on the methods
available, please check the documentation of `mock-interactions.js` and
`test-helpers.js`

## 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);
});
```

---
_Source: https://npm.io/package/@npm-polymer/iron-test-helpers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
