{"id":21417895,"url":"https://github.com/universal-ember/test-support","last_synced_at":"2025-07-14T05:30:28.237Z","repository":{"id":225750344,"uuid":"766754330","full_name":"universal-ember/test-support","owner":"universal-ember","description":"A general purpose collection of utilities to make testing easier","archived":false,"fork":false,"pushed_at":"2025-07-13T21:31:37.000Z","size":821,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-13T23:32:17.417Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/universal-ember.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-04T04:01:23.000Z","updated_at":"2025-06-16T00:53:23.000Z","dependencies_parsed_at":"2024-03-11T05:30:15.922Z","dependency_job_id":"0b332411-23dd-459d-976a-9213612f3d01","html_url":"https://github.com/universal-ember/test-support","commit_stats":null,"previous_names":["universal-ember/test-support"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/universal-ember/test-support","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-ember%2Ftest-support","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-ember%2Ftest-support/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-ember%2Ftest-support/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-ember%2Ftest-support/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/universal-ember","download_url":"https://codeload.github.com/universal-ember/test-support/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/universal-ember%2Ftest-support/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265224056,"owners_count":23730335,"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-11-22T19:17:53.848Z","updated_at":"2025-07-14T05:30:28.207Z","avatar_url":"https://github.com/universal-ember.png","language":"JavaScript","funding_links":[],"categories":["Testing"],"sub_categories":["Utilities"],"readme":"# test-support\n\nCommon utilities for every app to help making testing easier.\n\n\n## `getService`\n\nA typed way to get a service.\n\n```js\nimport { getService } from '@universal-ember/test-support';\n\ntest('can get a service', async function (assert) {\n  let router = getService('router');\n  //  ^ RouterService\n});\n```\n\n## `noop`\n\na no-op function. literally does nothing.\n\n```gjs\nimport { noop } from '@universal-ember/test-support';\n\n\u003ctemplate\u003e\n  {{ ( noop ) }}\n\u003c/template\u003e\n```\n\n## `refresh`\n\nSimulates refreshing the page without reloading the test window\n\n```js\nimport { module, test } from 'qunit';\nimport { setupApplicationTest } from 'ember-qunit';\nimport { currentURL, visit } from '@ember/test-helpers';\n\nimport { refresh } from '@universal-ember/test-support';\n\nmodule('refresh', function (hooks) {\n  setupApplicationTest(hooks);\n\n  test('are visitable without error', async function (assert) {\n    await visit('/foo');\n    await refresh(this);\n    assert.strictEqual(currentURL(), '/foo');\n  });\n});\n```\n\n## `visitAllLinks`\n\nWill visit all links, recursively, exhausting every link in your app (excluding external links).\n\nThis is helpful for making sure that no un-tested pages have errors.\n\n```js\nimport { module, test } from 'qunit';\nimport { setupApplicationTest } from 'ember-qunit';\n\nimport { visitAllLinks } from '@universal-ember/test-support';\n\nmodule('All Links', function (hooks) {\n  setupApplicationTest(hooks);\n\n  test('are visitable without error', async function (assert) {\n    const size1 = await visitAllLinks();\n    const size2 = await visitAllLinks((url) =\u003e {\n      assert.ok(url);\n    });\n\n    assert.ok(size1 \u003e 0, 'The test app has links');\n    assert.ok(size2 \u003e 0, 'The test app has links');\n  });\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversal-ember%2Ftest-support","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funiversal-ember%2Ftest-support","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiversal-ember%2Ftest-support/lists"}