{"id":31890026,"url":"https://github.com/testomatio/check-tests","last_synced_at":"2026-02-18T20:00:50.472Z","repository":{"id":36699828,"uuid":"229505933","full_name":"testomatio/check-tests","owner":"testomatio","description":"GitHub action with static analysis for JavaScript tests.","archived":false,"fork":false,"pushed_at":"2026-02-16T11:27:41.000Z","size":25518,"stargazers_count":20,"open_issues_count":26,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-02-16T19:54:59.145Z","etag":null,"topics":["hacktoberfest","hacktoberfest2021"],"latest_commit_sha":null,"homepage":"https://testomat.io","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/testomatio.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-22T01:56:54.000Z","updated_at":"2026-02-16T11:27:23.000Z","dependencies_parsed_at":"2025-12-16T07:10:33.733Z","dependency_job_id":null,"html_url":"https://github.com/testomatio/check-tests","commit_stats":{"total_commits":345,"total_committers":14,"mean_commits":"24.642857142857142","dds":0.5072463768115942,"last_synced_commit":"fe6dcc5a3c7610ff423a858fafb55608f5ee8fe3"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/testomatio/check-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fcheck-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fcheck-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fcheck-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fcheck-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testomatio","download_url":"https://codeload.github.com/testomatio/check-tests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testomatio%2Fcheck-tests/sbom","scorecard":{"id":875206,"data":{"date":"2025-08-11","repo":{"name":"github.com/testomatio/check-tests","commit":"42be828db30f3371049f2dfd1da87bf66f583903"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":4,"reason":"Found 12/30 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"18 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/auto-publish-on-release.yml:1","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-api.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/auto-publish-on-release.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/testomatio/check-tests/auto-publish-on-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/auto-publish-on-release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/testomatio/check-tests/auto-publish-on-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/auto-publish-on-release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/testomatio/check-tests/auto-publish-on-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/testomatio/check-tests/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/testomatio/check-tests/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/testomatio/check-tests/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-api.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/testomatio/check-tests/publish-api.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-api.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/testomatio/check-tests/publish-api.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/auto-publish-on-release.yml:17","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:19","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}}]},"last_synced_at":"2025-08-24T05:42:42.088Z","repository_id":36699828,"created_at":"2025-08-24T05:42:42.088Z","updated_at":"2025-08-24T05:42:42.088Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29593908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T18:54:29.675Z","status":"ssl_error","status_checked_at":"2026-02-18T18:50:50.517Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hacktoberfest","hacktoberfest2021"],"created_at":"2025-10-13T07:17:38.261Z","updated_at":"2026-02-18T20:00:50.459Z","avatar_url":"https://github.com/testomatio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌀 AutoCheck Tests by Testomatio\n\n\u003e GitHub Action with Static Analysis for your JavaScript tests.\n\nThis action shows changed tests on each pull request with a complete list of all tests in this project. You can create test document in wiki of the project.\n\nUse this checker as\n\n- [GitHub Action](#github-action)\n- [CLI tool](#cli)\n\n📖 **[Complete CLI Configuration Documentation](cli.md)** - Detailed reference for all CLI options and environment variables\n\n### Features\n\n- Analyzes JavaScript test files in Pull Request\n- Uses AST parser to analyze tests\n- Detects added, removed, skipped tests\n- Fails when finds `.only` exclusive tests\n- Adds labels for PR with or witout tests\n- Shows expressive report for each PR\n- [TypeScript](#typescript) supported\n\n## GitHub Action\n\n### Sample Report\n\n---\n\n🌀 Tests overview by [Testomatio](https://testomat.io)\n\nFound **7** codeceptjs tests in 1 files\n\n#### ✔️ Added 1 test\n\n```diff\n+ @first Create Todos @step:06 @smoke @story:12345: Another test\n```\n\n#### ⚠️ Skipped 1 test\n\n```diff\n- @first Create Todos @step:06 @smoke @story:12345: Create multiple todo items\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003e📑 List all tests\u003c/summary\u003e\n\n---\n\n📎 **`@first` Create Todos `@step:06` `@smoke` `@story:12345`**\n\n📝 [todomvc-tests/create-todos_test.js](#)\n\n- [Create a new todo item](#)\n- [Another test](#)\n- [~~Create multiple todo items~~](#) ⚠️ _skipped_\n- [Text input field should be cleared after each item](#)\n- [Text input should be trimmed](#)\n- [New todos should be added to the bottom of the list](#)\n- [Footer should be visible when adding TODOs](#)\n\n\u003c/details\u003e\n\ntests\n\n\u003c/details\u003e\n\n---\n\n## Usage\n\nOnce this action is enabled, bot will create a comment for each Pull Request with a list of all changed tests.\n\nThis information is useful to:\n\n- track addition and removal of tests\n- protect from skipping tests\n- protect from using `.only` exclusive tests\n- automatically mark PR with `has tests` or `no tests` labels\n- review tests on GitHub\n\n## Installation\n\nCheck that your project uses one of the following testing frameworks (this list will be extended).\n\n**Supported testing frameworks**\n\n- codeceptjs\n- cypress.io\n- gauge (Gauge specifications)\n- jasmine\n- jest\n- mocha\n- newman (Postman collections)\n- [nightwatch](https://nightwatchjs.org) [more info](docs/frameworks/nightwatch.md)\n- playwright\n- protractor\n- qunit\n- testcafe\n- vitest\n- manual (Markdown-based manual tests)\n\nAdd this action to your workflow file `.github/workflow/main.yml` and configure.\n\n```yml\non: [push]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    name: Check Tests\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n      - uses: testomatio/check-tests@stable\n        with:\n          framework: # REQUIRED - testing framework\n          tests: # REQUIRED - glob pattern to match test files\n          token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n\u003e It is important to enable `actions/checkout@v2` step with `fetch-depth: 0` to allow testomatio to compare tests in pull requests with tests in base.\n\n#### Inputs (Configuration)\n\n- `framework` - _(required)_ Test framework to be used. Supported: mocha, codeceptjs'\n- `tests` - _(required)_ Glob pattern to match tests in a project, example: `tests/**_test.js'`\n- `token` - _(should be: `${{ secrets.GITHUB_TOKEN }}`)_ GitHub token to post comment with summary to current pull request\n- `typescript` - enable TypeScript support\n- `has-tests-label` - add a label when PR contains new tests. Set `true` or a label name to enable.\n- `no-tests-label` - add a label when PR contains no new tests. Set `true` or a label name to enable.\n- `comment-on-empty` - post a comment to PR when no tests added. Can be either boolean (for neutral message) or a custom message within a comment (markdown supported)\n- `close-on-empty` - close PR when no tests added. Use with `comment-on-empty` to clarify this action\n- `comment-on-skipped` - add custom message when new tests are skipped (markdown supported).\n- `close-on-skipped` - close PR when introduced skipped tests. Use with `comment-on-skipped` to clarify this action\n- `enable-documentation` - If set to `true`, test document will be created in wiki.\n- `wiki-doc-name` - Name of the wiki document. By default it will use `Test Document`\n- `documentation-branch` - Branch to create document on push. Uses default branch if this field is empty\n- `github-pat` - Github Private access token to create document in wiki.\n\n### Examples\n\n#### For creating test document\n\nThis example uses jest as example. Tests are located in `tests/` directory. You can generate GH_PAT [here](https://github.com/settings/tokens/new) and add the generated token in secrets of your repo.\n\nIf documentation branch is not provided, it will consider default branch of the repo.\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: actions/setup-node@v1\n    with:\n      node-version: '12'\n  - run: npm install\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: jest\n      tests: 'tests/*.spec.js'\n      token: ${{ secrets.GITHUB_TOKEN }}\n      github-pat: ${{ secrets.GH_PAT }}\n      enable-documentation: true\n      wiki-doc-name: 'Test-Document'\n      documentation-branch: 'doc-branch'\n```\n\n#### Jest\n\nJest tests located in `tests/` directory:\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: jest\n      tests: tests/**.spec.js\n      token: ${{ secrets.GITHUB_TOKEN }}\n      comment-on-empty: true\n      has-tests-label: true\n```\n\n- list all tests even no tests were added\n- add label if tests were added\n\n#### Cypress.io\n\nCypress.io tests located in `cypress/integration` directory:\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: cypress.io\n      tests: cypress/integration/**.js\n      token: ${{ secrets.GITHUB_TOKEN }}\n      comment-on-empty: true\n      has-tests-label: true\n```\n\n- list all tests even no tests were added\n- add label if tests were added\n\n#### CodeceptJS\n\nCodeceptJS tests located in `tests` directory:\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: codeceptjs\n      tests: tests/**_test.js\n      token: ${{ secrets.GITHUB_TOKEN }}\n      comment-on-empty: true\n      has-tests-label: true\n```\n\n- list all tests even no tests were added\n- add label if tests were added\n\n#### Protractor\n\nProtractor tests located in `spec` directory:\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: protractor\n      tests: spec/**.spec.js\n      token: ${{ secrets.GITHUB_TOKEN }}\n      comment-on-empty: true\n      has-tests-label: true\n```\n\n- list all tests even no tests were added\n- add label if tests were added\n\n#### Protractor with TypeScript\n\nProtractor tests located in `spec` directory:\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: protractor\n      tests: spec/**.spec.ts\n      token: ${{ secrets.GITHUB_TOKEN }}\n      typescript: true\n```\n\n#### Mocha\n\nMocha tests located in `tests/` directory:\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: mocha\n      tests: tests/**_test.js\n      token: ${{ secrets.GITHUB_TOKEN }}\n      no-tests-label: Tests Needed\n```\n\n#### Testcafe\n\nTestcafe tests located in `tests/` directory:\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: testcafe\n      tests: tests/**/*.js\n      token: ${{ secrets.GITHUB_TOKEN }}\n      no-tests-label: Tests Needed\n```\n\n#### Newman\n\n```\nTESTOMATIO={apiKey} npx check-tests newman \"your_collection_name.json\"\n```\n\nor\n\n```\nTESTOMATIO={apiKey} npx check-tests newman \"folder_with_collections/*.json\"\n```\n\n### Close PRs without tests\n\nWhen PR doesn't contain tests - close it and write a message\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: protractor\n      tests: spec/**_spec.js\n      token: ${{ secrets.GITHUB_TOKEN }}\n      comment-on-empty: '## PRs without tests not allowed'\n      close-on-empty: true\n```\n\n### Notify on skipped tests\n\nWhen PR contains skipped tests - close it and write a message\n\n```yml\nsteps:\n  - uses: actions/checkout@v2\n    with:\n      fetch-depth: 0\n  - uses: testomatio/check-tests@stable\n    with:\n      framework: protractor\n      tests: spec/**_spec.js\n      token: ${{ secrets.GITHUB_TOKEN }}\n      comment-on-skipped: \"## Don't mark tests as skipped!\"\n      close-on-skipped: true\n```\n\n## CLI\n\nUse this checker as CLI tool with any Continuous Integration service.\n\nRun `check-tests` via npx:\n\n```sh\nnpx check-tests \u003cframework\u003e \"\u003ctests\u003e\" --no-skipped\n```\n\n### Requiring Testomat.io IDs\n\nTo fail the build if tests are missing Testomat.io IDs:\n\n```sh\nnpx check-tests \u003cframework\u003e \"\u003ctests\u003e\" --require-ids\n```\n\nThis is perfect for CI environments where you want to ensure all tests are properly tracked in Testomat.io.\n\n### Development\n\nTo change host of endpoint for receiving data, and set it to other than app.testomat.io use TESTOMATIO_URL environment variable:\n\nTESTOMATIO_URL=http://local.testomat.io\n\n\u003e This checker will fail a build if exclusive tests (with `.only` or `fit` or `fdescribe` found)\n\n### Arguments:\n\n- test framework\n- glob pattern to match tests in a project, example: `tests/**_test.js'`. **It is important to include glob pattern in double quotes `\"` so wildcard could be used correctly.**\n\n### CLI Options:\n\n- `--no-skipped` - fail when skipped tests found\n- `--require-ids` - fail when tests are missing Testomat.io IDs\n- `--typescript` - enable typescript support\n- `-g, --generate-file \u003cfileName\u003e` - Export test details to document\n- `-u, --url \u003curl\u003e`, Github URL to get file link (URL/tree/master)\n\n### Example\n\n### Framework Examples\n\n#### CodeceptJS\n\n```bash\n# JavaScript\nnpx check-tests codeceptjs \"tests/**_test.js\"\n\n# TypeScript\nnpx check-tests codeceptjs \"tests/**_test.ts\" --typescript\n```\n\n#### Cypress.io\n\n```bash\n# JavaScript\nnpx check-tests cypress \"cypress/integration/**.js\"\nnpx check-tests cypress.io \"cypress/e2e/**.js\"\n\n# TypeScript\nnpx check-tests cypress \"cypress/integration/**.ts\" --typescript\nnpx check-tests cypress.io \"cypress/e2e/**.spec.ts\" --typescript\n```\n\n#### Jasmine\n\n```bash\n# JavaScript\nnpx check-tests jasmine \"spec/**/*.spec.js\"\n\n# TypeScript\nnpx check-tests jasmine \"spec/**/*.spec.ts\" --typescript\n```\n\n#### Jest\n\n```bash\n# JavaScript\nnpx check-tests jest \"tests/**/*.test.js\"\nnpx check-tests jest \"__tests__/**/*.js\"\n\n# TypeScript\nnpx check-tests jest \"tests/**/*.test.ts\" --typescript\nnpx check-tests jest \"src/**/*.spec.ts\" --typescript\n```\n\n#### Mocha\n\n```bash\n# JavaScript\nnpx check-tests mocha \"test/**/*_test.js\"\nnpx check-tests mocha \"tests/**/*.spec.js\"\n\n# TypeScript\nnpx check-tests mocha \"test/**/*.test.ts\" --typescript\n```\n\n#### Newman (Postman Collections)\n\n```bash\n# Single collection\nnpx check-tests newman \"api-tests.postman_collection.json\"\n\n# Multiple collections\nnpx check-tests newman \"collections/*.json\"\n```\n\n#### Nightwatch\n\n```bash\n# JavaScript\nnpx check-tests nightwatch \"tests/**/*.js\"\n\n# TypeScript\nnpx check-tests nightwatch \"tests/**/*.ts\" --typescript\n```\n\n#### Playwright\n\n```bash\n# JavaScript\nnpx check-tests playwright \"tests/**/*.spec.js\"\nnpx check-tests playwright \"e2e/**/*.test.js\"\n\n# TypeScript\nnpx check-tests playwright \"tests/**/*.spec.ts\" --typescript\nnpx check-tests playwright \"e2e/**/*.test.ts\" --typescript\n```\n\n#### Protractor\n\n```bash\n# JavaScript\nnpx check-tests protractor \"spec/**.spec.js\"\nnpx check-tests protractor \"e2e/**/*_spec.js\"\n\n# TypeScript\nnpx check-tests protractor \"spec/**.spec.ts\" --typescript\nnpx check-tests protractor \"e2e/**/*.spec.ts\" --typescript\n```\n\n#### QUnit\n\n```bash\n# JavaScript\nnpx check-tests qunit \"tests/**/*.js\"\n\n# TypeScript\nnpx check-tests qunit \"tests/**/*.ts\" --typescript\n```\n\n#### TestCafe\n\n```bash\n# JavaScript\nnpx check-tests testcafe \"tests/**.js\"\nnpx check-tests testcafe \"fixtures/**/*.test.js\"\n\n# TypeScript\nnpx check-tests testcafe \"tests/**.ts\" --typescript\nnpx check-tests testcafe \"fixtures/**/*.test.ts\" --typescript\n```\n\n#### Vitest\n\n```bash\n# JavaScript\nnpx check-tests vitest \"tests/**/*.test.js\"\nnpx check-tests vitest \"src/**/*.spec.js\"\n\n# TypeScript\nnpx check-tests vitest \"tests/**/*.test.ts\" --typescript\nnpx check-tests vitest \"src/**/*.spec.ts\" --typescript\n```\n\n#### Gauge\n\n```bash\n# Gauge specification files\nnpx check-tests gauge \"specs/**/*.spec\"\nnpx check-tests gauge \"tests/**/*.spec\"\n```\n\n#### Manual Tests (Markdown)\n\n```bash\n# Markdown-based manual test documentation\nnpx check-tests manual \"docs/tests/**/*.md\"\nnpx check-tests manual \"manual-tests/*.md\"\n```\n\n### Sample Output\n\nList CodeceptJS tests\n\n![](https://user-images.githubusercontent.com/24666922/78563263-505d1280-7838-11ea-8fbc-18e942d48485.png)\n\nWhen found `.only` test:\n\n```\n✗ npx check-tests mocha \"test/**/**_test.js\"\n\n[[ Tests checker by testomat.io ]]\nError: Exclusive tests detected. `.only` call found in test/checkout/important_test.js:290\nRemove `.only` to restore test checks\n\n```\n\n## Using in Testomatio\n\nThis library is used by [Testomatio](https://testomat.io) to import tests.\n\n## Importing Into Project\n\nUse `TESTOMATIO` environment variable with a valid API key to import data into a project.\nAPI key can be obtained on project settings page or on \"Import From Source\" page.\n\nFor example:\n\n```\nTESTOMATIO=11111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\"\n\n```\n\n### Test code\n\nBy default, check-test sends the code of the test hooks to the \"client\": before, beforeEach and after.\nIn the \"Codes\" section you can see all the additional \"context\" of the test (Testomat.io).\n\nTo exclude hook code from a client test, use the --no-hooks option\n\n```\nTESTOMATIO=11111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --no-hooks\n```\n\n### Additional line number to the test code\n\nTo include line number code from a client test, use --line-numbers option.\n_(By default Code section exclude \"line number\")_\n\n```\nTESTOMATIO=11111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --line-numbers\n```\n\n## Import Parametrized Tests\n\nIt is possible to import parametrized tests if they use template literals with variables in thier names:\n\n```js\n['one', 'two', 'three'].forEach(() =\u003e {\n  it(`this is test number ${parameter}`);\n});\n```\n\nThis test will be imported with its original name including a placeholder:\n\n```\nthis is test number ${parameter}\n```\n\nWhen executed test will be reported with 3 results matched to the same test and param values will be added to the report.\n\n## Disable Detached Tests\n\nIf a test from a previous import was not found on next import it is marked as \"detached\".\nThis is done to ensure that deleted tests are not staying in Testomatio while deleted in codebase.\n\nTo disable this behavior and don't mark anything on detached on import use `--no-detached` option\n\n```\nTESTOMATIO=11111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --no-detached\n```\n\nThis option could also be set via environment variable `TESTOMATIO_NO_DETACHED=1`.\nIf you don't want to pass it each time, create .env file in the root dir of your project with this variable set.\n\n## Synchronous Import\n\nBy default `check-tests` doesn't wait for all tests to be processed. It sends request to Testomatio and exits. To wait for processing to finish use `--sync` option.\n\n```\nTESTOMATIO=11111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --sync\n```\n\n\u003e [!WARNING]\n\u003e Avoid `--sync` when importing large code bases, as sync request can be blocked by timeout. Import tests without `--sync` flag for seamless experience\n\nPlease note, that this will take a long time on a large codebase.\n\n## Auto-assign Test IDs in Source Code\n\nTo disable guess matching for tests it is recommend to use Testomatio IDs to map a test in source code to a test in Testomatio. Testomatio IDs can be put automatically into the test names into source code when `--update-ids` option is used:\n\n```\nTESTOMATIO=11111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --update-ids\n```\n\nTests imported with `--update-ids` will be processed in synchronouse mode, so the script will finish after all tests are processed.\n\n\u003e [!WARNING]\n\u003e When importing large code bases, it is recommended to import all tests first without `--update-ids` flag. Once you ensure all tests were imported and displayed in UI, run the same command with `--update-ids`. This ensures that server finishes processing data and IDs are ready to be assigned.\n\n### Reserved Tag Format\n\n⚠️ **Do not use tags matching the pattern `@T` followed by 8 alphanumeric characters** (e.g., `@Tabcd1234`, `@Ta1k4ghg9`, `@TeacherXP`). This format is reserved by Testomatio for auto-assigned test IDs. Using tags that match this pattern may cause conflicts during test synchronization and IDs assignment.\n\nIf you need to use tags starting with `@T`, ensure they don't follow the `@T + 8 characters` format. For example:\n\n- ✅ `@Teachers` - safe (7 characters after @T)\n- ❌ `@TeacherXP`, `@Ta1b2c3d4` - reserved format, avoid this\n- ✅ `@teacherXP` - as workaround, use lowercase 't' to avoid reserved format\n\n## Keep Test IDs Between Projects\n\nTo import tests with Test IDs set in source code into another project use `--create` option. In this case, a new project will be populated with the same Test IDs.\n\n```\nTESTOMATIO=11111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --create\n```\n\nWithout `--create` import will fail with a message that ID was not found.\n\n## Clean Test IDs\n\nIf you want to import the synced project as new project, you have to clean the test ids.\nTo clean up test ids without connecting to Testomatio project use `--purge` option:\n\n```\nnpx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --purge\n```\n\nThis method may be unsafe, as it cleans all `@S*` and `@T*` tags that match the test ID format from tests and suites (specifically tags matching `@T` followed by exactly 8 alphanumeric characters, and `@S` followed by exactly 8 alphanumeric characters). If you use this option make sure all test titles are correct before committing the tests in GIT.\n\n\u003e **Note:** `--purge` is an alias of `--unsafe-clean-ids` option.\n\nTo clean only test ids set from a specific project use `--clean-ids` option instead:\n\n```\nTESTOMATIO=11111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --clean-ids\n```\n\nTESTOMATIO is API key of a project with existing test ids.\n\n## Import Into a Branch\n\nTests can be imported into a specific branch if `TESTOMATIO_BRANCH` parameter is used.\nBranch is matched by its id. If branch was not found, it will be created.\n\n```\nTESTOMATIO_BRANCH=dev TESTOMATIO=1111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\"\n```\n\n## Keep Structure of Source Code\n\nWhen tests in source code have IDs assigned and those tests are imported, Testomat.io uses current structure in a project to put the tests in. If folders in source code doesn't match folders in Testomat.io project, existing structure in source code will be ignored. To force using the structure from the source code, use `--keep-structure` flag on import:\n\n```\nTESTOMATIO=1111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --keep-structure\n```\n\n## Delete Empty Suites\n\nIf tests were marked with IDs and imported to already created suites in Testomat.io\nnewly imported suites may become empty. Use `--no-empty` option to clean them up after import.\n\n```\nTESTOMATIO=1111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --no-empty\n```\n\n\u003e This prevents usage --keep-structure option.\n\n### Import Into a Specific Suite\n\nTo put all imported tests into a specific suite (folder) pass in `TESTOMATIO_PREPEND_DIR` environment variable, avoid using special characters in the directory name. This helps prevent potential errors across different operating systems and command-line environments.\n\n**Recommendations:**\n\nUse only letters `(A-Z, a-z)`, numbers `(0-9)`, hyphens `(-)`, and underscores `(_)`.\nAvoid characters like `/, \\, :, *, ?, \", \u003c, \u003e, |, \u0026, $, #, %, @,` and the apostrophe `(')`.\nExamples of recommended naming: `MyTests` or `project_tests`.\n\n```\nTESTOMATIO_PREPEND_DIR=\"MyTESTS\" TESTOMATIO=1111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\"\n```\n\nThis will use \"MyTests\" folder in a root of a project or create it if it doesn't exist.\n\nIt is also possible to specify a suite by its SID:\n\n```\nTESTOMATIO_SUITE=\"1111111\" TESTOMATIO=1111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\"\n```\n\nor use SID with prefix:\n\n```\nTESTOMATIO_SUITE=\"S1111111\" TESTOMATIO=1111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\"\nTESTOMATIO_SUITE=\"@S1111111\" TESTOMATIO=1111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\"\n```\n\n## Apply Labels to Tests\n\nUse `TESTOMATIO_LABELS` to tag all imported tests with labels:\n\n```bash\n# Apply single label\nTESTOMATIO_LABELS=\"smoke\" TESTOMATIO=1111111 npx check-tests jest \"tests/**/*.test.js\"\n\n# Apply multiple labels (comma-separated)\nTESTOMATIO_LABELS=\"smoke,regression,api\" TESTOMATIO=1111111 npx check-tests playwright \"tests/**/*.spec.ts\"\n\n# Apply labels with values using label:value format\nTESTOMATIO_LABELS=\"severity:high,feature:user_account,team:backend\" TESTOMATIO=1111111 npx check-tests jest \"tests/**/*.test.js\"\n\n# Mix simple labels and label:value pairs\nTESTOMATIO_LABELS=\"smoke,severity:critical,feature:auth,regression\" TESTOMATIO=1111111 npx check-tests playwright \"tests/**/*.spec.ts\"\n\n# Use alias for Python SDK compatibility\nTESTOMATIO_SYNC_LABELS=\"integration,e2e\" TESTOMATIO=1111111 npx check-tests cypress \"cypress/integration/**/*.js\"\n```\n\n## Remove Path Prefixes\n\nUse `TESTOMATIO_WORKDIR` to avoid redundant folder nesting:\n\n```bash\n# Problem: src/tests/API/ creates nested paths in Testomat.io\n# Solution: Set working directory to remove src/tests prefix\nTESTOMATIO_WORKDIR=src/tests TESTOMATIO=1111111 npx check-tests playwright \"**/*.spec.ts\"\n\n# Monorepo: Import without parent paths\nTESTOMATIO_WORKDIR=apps/frontend TESTOMATIO=1111111 npx check-tests jest \"**/*.test.js\"\n```\n\n## Group Tests by Category\n\nUse `TESTOMATIO_PREPEND_DIR` to organize tests:\n\n```bash\n# Group API tests under \"API Tests\" folder\nTESTOMATIO_PREPEND_DIR=\"API Tests\" TESTOMATIO=1111111 npx check-tests jest \"src/api/**/*.test.js\"\n\n# Separate by team\nTESTOMATIO_PREPEND_DIR=\"Frontend Team\" TESTOMATIO=1111111 npx check-tests playwright \"tests/ui/**/*.spec.ts\"\n```\n\n## Import to Specific Suite\n\nUse `TESTOMATIO_SUITE` to target existing suites:\n\n```bash\n# Import to existing suite by SID\nTESTOMATIO_SUITE=S1234567 TESTOMATIO=1111111 npx check-tests jest \"features/**/*.test.js\"\n```\n\n## TypeScript\n\nFor TypeScript projects `@babel/core` and `@babel/plugin-transform-typescript` packages are used. GitHub Action already contains those modules, while CLI version of this tool tries to automatically install them on first run.\n\nIf you face issues parsing TypeScript file menitioning `@babel/core` or `@babel/plugin-transform-typescript` try to install them manually:\n\n```\nnpm i @babel/core @babel/plugin-transform-typescript --save-dev\n```\n\nNow tests TypeScript can be imported with `--typescript` option:\n\n```\nTESTOMATIO=11111111 npx check-tests CodeceptJS \"**/*{.,_}{test,spec}.js\" --typescript\n```\n\n### ES2023 Support\n\nStarting from version 0.13.3, the tool supports ES2023 Explicit Resource Management (ERM) syntax including:\n\n- `using` declarations for automatic resource disposal\n- `[Symbol.dispose]` method definitions\n\nThis allows parsing of modern TypeScript/JavaScript files that use resource management patterns:\n\n```typescript\nconst getResource = () =\u003e ({\n  [Symbol.dispose]: () =\u003e { /* cleanup code */ },\n});\n\ntest('resource management', () =\u003e {\n  using resource = getResource();\n  // resource will be automatically disposed at the end of the scope\n});\n```\n\n## Test aliases\n\nTest aliases are used to map tests in source code to tests in Testomat.io. By default `test` and `it` are parsed. But if you rename them or use another function to define tests (e.g. created/extended test object in Playwright), you can add alias (or multiple aliases, separated by comma) via `--test-alias` option:\n\n```\nTESTOMATIO=11111111 npx check-tests Playwright \"**/*{.,_}{test,spec}.ts\" --test-alias myTest,myCustomFunction\n```\n\n## Programmatic API\n\nImport Analyzer from module:\n\n```js\nconst { Analyzer } = require('check-tests');\n\nconst framework = 'jest';\nconst pathToTests = './tests';\nconst pattern = '**/*[._-]{test,spec}.{ts,js}';\n\nconst analyzer = new Analyzer(framework, pathToTests);\n\n// to enable typescript...\nanalyzer.withTypeScript();\n\n// to enable babel plugins\nanalyzer.addPlugin('@babel/plugin-syntax-jsx');\nanalyzer.addPlugin('@babel/plugin-syntax-flow');\n\n// to enable babel presets\nanalyzer.addPreset('@babel/preset-react');\nanalyzer.addPreset('@babel/preset-flow');\n\nanalyzer.analyze(pattern);\n\n// stats on processed files\nconst stats = analyzer.stats;\n\n// full info on parsed tests\nconst data = analyzer.rawTests;\n```\n\n## Debugging\n\nRun import with `DEBUG=\"testomatio:*\"` environment variable to get additional logs which may help understanding the cause of an issue. Usually it may happen because of a specific file that couldn't be parsed:\n\n```\nDEBUG=\"testomatio:*\" npx check-tests@latest ....\n```\n\n## API Definition\n\nAPI Endpoint to import test data into Testomat.io:\n\n[Import API Reference](https://testomatio.github.io/check-tests/)\n\n## Limitations\n\n- Can't analyze included tests from external files\n- Can't analyze dynamically created tests\n\n## License MIT\n\nPart of [Testomat.io](https://testomat.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestomatio%2Fcheck-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestomatio%2Fcheck-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestomatio%2Fcheck-tests/lists"}