{"id":13812852,"url":"https://github.com/PolymerElements/iron-test-helpers","last_synced_at":"2025-05-14T22:31:13.238Z","repository":{"id":30850465,"uuid":"34407976","full_name":"PolymerElements/iron-test-helpers","owner":"PolymerElements","description":"Utility classes to make testing easier","archived":false,"fork":false,"pushed_at":"2024-10-09T19:04:28.000Z","size":261,"stargazers_count":26,"open_issues_count":29,"forks_count":25,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-05T02:11:31.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PolymerElements.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-22T18:25:31.000Z","updated_at":"2020-01-13T02:59:38.000Z","dependencies_parsed_at":"2024-06-18T15:15:13.329Z","dependency_job_id":"83f370e5-fcf3-4e44-9581-c744731c2c4a","html_url":"https://github.com/PolymerElements/iron-test-helpers","commit_stats":{"total_commits":128,"total_committers":23,"mean_commits":5.565217391304348,"dds":0.8515625,"last_synced_commit":"8c6ad1d3fa3b73d38f4b63da785344c7ab99a5a6"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-test-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-test-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-test-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-test-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PolymerElements","download_url":"https://codeload.github.com/PolymerElements/iron-test-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254239522,"owners_count":22037721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:00:56.549Z","updated_at":"2025-05-14T22:31:08.193Z","avatar_url":"https://github.com/PolymerElements.png","language":"JavaScript","funding_links":[],"categories":["Testing"],"sub_categories":["Sublime Text"],"readme":"[![Published on NPM](https://img.shields.io/npm/v/@polymer/iron-test-helpers.svg)](https://www.npmjs.com/package/@polymer/iron-test-helpers)\n[![Build status](https://travis-ci.org/PolymerElements/iron-test-helpers.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-test-helpers)\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://webcomponents.org/element/@polymer/iron-test-helpers)\n\n## iron-test-helpers\n\nA set of utility classes to make testing easier. For more details on the methods\navailable, please check the documentation of `mock-interactions.js` and\n`test-helpers.js`\n\nSee: [Documentation](https://www.webcomponents.org/element/@polymer/iron-test-helpers).\n\n## Usage\n\n### Mock Interactions\n\nThis is a set of methods to simulate mouse or keyboard interaction with an\nelement.\n\n```javascript\nimport {pressSpace, tap} from '@polymer/iron-test-helpers/mock-interactions.js';\n\ntest('can be triggered with space', function(done) {\n  button.addEventListener('keydown', function() {\n    done();\n  });\n  pressSpace(button);\n});\n\ntest('can be clicked', function(done) {\n  button.addEventListener('click', function() {\n    done();\n  });\n  tap(button);\n});\n```\n\n### Note on globals\n\nNote that in version 3.x, importing `mock-interactions.js` and `test-helpers.js`\nwill also set the `window.MockInteractions` and `window.TestHelpers` globals,\nrespectively (and importing `iron-test-helpers.js` will set both). This is done\nonly for backwards compatibility, and will be removed in the next major version.\nAll users should migrate away from globals and onto direct ES module imports.\n\n## Contributing\nIf you want to send a PR to this element, here are\nthe instructions for running the tests and demo locally:\n\n### Installation\n```sh\ngit clone https://github.com/PolymerElements/iron-test-helpers\ncd iron-test-helpers\nnpm install\nnpm install -g polymer-cli\n```\n\n### Running the tests\n```sh\npolymer test --npm\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPolymerElements%2Firon-test-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPolymerElements%2Firon-test-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPolymerElements%2Firon-test-helpers/lists"}