{"id":19973780,"url":"https://github.com/dojo/cli-test-intern","last_synced_at":"2025-07-07T13:34:50.873Z","repository":{"id":38009301,"uuid":"78222559","full_name":"dojo/cli-test-intern","owner":"dojo","description":":rocket: Dojo - cli command for testing applications","archived":false,"fork":false,"pushed_at":"2022-12-02T02:47:09.000Z","size":1630,"stargazers_count":2,"open_issues_count":9,"forks_count":19,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-24T14:45:44.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://dojo.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-06T16:52:54.000Z","updated_at":"2023-07-23T06:04:19.000Z","dependencies_parsed_at":"2023-01-23T06:00:35.031Z","dependency_job_id":null,"html_url":"https://github.com/dojo/cli-test-intern","commit_stats":null,"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojo%2Fcli-test-intern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojo%2Fcli-test-intern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojo%2Fcli-test-intern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dojo%2Fcli-test-intern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dojo","download_url":"https://codeload.github.com/dojo/cli-test-intern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252278997,"owners_count":21722805,"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-13T03:12:50.294Z","updated_at":"2025-05-04T02:32:07.012Z","avatar_url":"https://github.com/dojo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cli-test-intern\n\n[![Build Status](https://travis-ci.org/dojo/cli-test-intern.svg?branch=master)](https://travis-ci.org/dojo/cli-test-intern)\n[![Build status](https://ci.appveyor.com/api/projects/status/nbgg2yf7hepsvvn2/branch/master?svg=true)](https://ci.appveyor.com/project/Dojo/cli-test-intern/branch/master)\n[![codecov](https://codecov.io/gh/dojo/cli-test-intern/branch/master/graph/badge.svg)](https://codecov.io/gh/dojo/cli-test-intern)\n[![npm version](https://badge.fury.io/js/%40dojo%2Fcli-test-intern.svg)](https://badge.fury.io/js/%40dojo%2Fcli-test-intern)\n\nThe official Dojo test command. This package uses Intern to run unit and functional tests against your Dojo project.\n\n## Usage\n\n### Prerequisites\n\nThis project is a command for the [Dojo CLI]. Please visit the Dojo CLI project for\n information about the project and how to install.\n\n### Installation\n\nThe use `@dojo/cli-test-intern` in a project, install the package:\n\n```bash\nnpm install @dojo/cli-test-intern\n```\n\n### Basic Usage\n\nFirst, build your application and tests using [@dojo/cli-build-app]\n\n```bash\ndojo build app --mode dev\ndojo build app --mode test\n```\n\nThen, run your tests using @dojo/cli-test-intern\n\n```bash\ndojo test -a\n```\n\nThere are several configuration options available. To list them run `dojo test -h`.\n\n## Running Tests\n\nIntern supports two types of testing approaches unit and functional. Unit tests are tests run via node and the local\n[Selenium] tunnel and test isolated blocks of code. Functional tests are run using Selenium in the browser and test\nthe overall functionality of the software as a user would interact with it.\n\n### Unit tests\n\nUnit tests may be run explicitly with the `-u` flag or as part of a full test run using the `-a` flag\n\n```bash\ndojo test -u\n```\n\n`@dojo/cli-test-intern` will execute tests located at `output/tests/unit.js` in node and in Chrome and provide a report \nlisting any failed tests and display a coverage report.\n\n### Functional tests\n\nFunctional tests may be run explicitly with the `-f` flag or as part of a full test run using the `-a` flag\n\n```bash\ndojo test -f\n```\n\n`@dojo/cli-test-intern` will execute tests located at `./output/test/functional.js` in Chrome using Selenium and provide a\n report listing any failed tests.\n\n### Testing services\n\nIntern comes with support for running tests remotely on [BrowserStack], [SauceLabs], and [TestingBot]. You may use one\n of these services by signing up for an account and providing your credentials to cli-test-intern. By default, all of\n the testing services will run tests against IE11, Firefox, and Chrome.\n \n#### BrowserStack\n\n[BrowserStack] requires an access key and username to use its services. These may be provided on the command line or as \nenvironment variables as described in [Intern's documentation](https://theintern.io/docs.html#Intern/4/docs/docs%2Frunning.md/cloud-service).\n\n```bash\ndojo test -a -c browserstack -k \u003caccesskey\u003e --userName \u003cusername\u003e\n```\n\nor with environment variables\n\n```bash\nBROWSERSTACK_USERNAME=\u003cusername\u003e BROWSERSTACK_ACCESS_KEY=\u003ckey\u003e dojo test -a -c browserstack\n```\n\n#### SauceLabs\n\n[SauceLabs] requires an access key and username to use its services. These may be provided on the command line or as \nenvironment variables as described in [Intern's documentation](https://theintern.io/docs.html#Intern/4/docs/docs%2Frunning.md/cloud-service).\n\n```bash\ndojo test -a -c saucelabs -k \u003caccesskey\u003e --userName \u003cusername\u003e\n```\n\nor with environment variables\n\n```bash\nSAUCE_USERNAME=\u003cusername\u003e SAUCE_ACCESS_KEY=\u003ckey\u003e dojo test -a -c saucelabs\n```\n\n#### TestingBot\n\n[TestingBot] requires an key and a secret to use its services. These may be provided on the command line or as \nenvironment variables as described in [Intern's documentation](https://theintern.io/docs.html#Intern/4/docs/docs%2Frunning.md/cloud-service).\n\n```bash\ndojo test -a -c testingbot -k \u003ckey\u003e -s \u003csecret\u003e\n```\n\nor with environment variables\n\n```bash\nTESTINGBOT_SECRET=\u003csecret\u003e TESTINGBOT_KEY=\u003ckey\u003e dojo test -a -c saucelabs\n```\n\n## How do I contribute?\n\nWe appreciate your interest!  Please see the [Dojo 2 Meta Repository](https://github.com/dojo/meta#readme) for the\nContributing Guidelines.\n\n### Code Style\n\nThis repository uses [`prettier`](https://prettier.io/) for code styling rules and formatting. A pre-commit hook is installed automatically and configured to run `prettier` against all staged files as per the configuration in the projects `package.json`.\n\nAn additional npm script to run `prettier` (with write set to `true`) against all `src` and `test` project files is available by running:\n\n```bash\nnpm run prettier\n```\n\n## Testing\n\nTest cases MUST be written using [Intern] using the \"bdd\" test interface and \"assert\" assertion interface.\n\n90% branch coverage MUST be provided for all code submitted to this repository, as reported by Istanbul’s combined coverage results for all supported platforms.\n\nTo test locally in node run:\n\n`grunt test`\n\n© 2018 [JS Foundation] \u0026 contributors. [New BSD](LICENSE) license.\n\n[@dojo/cli-build-app]: https://github.com/dojo/cli-build-app\n[BrowserStack]: https://www.browserstack.com/\n[Dojo CLI]: https://github.com/dojo/cli\n[Intern]: https://theintern.io/\n[JS Foundation]: https://js.foundation/\n[SauceLabs]: https://saucelabs.com/\n[Selenium]: http://www.seleniumhq.org/\n[TestingBot]: https://testingbot.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdojo%2Fcli-test-intern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdojo%2Fcli-test-intern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdojo%2Fcli-test-intern/lists"}