{"id":16776375,"url":"https://github.com/ameshkov/node-qunit-puppeteer","last_synced_at":"2026-03-07T02:32:54.764Z","repository":{"id":33165044,"uuid":"153757948","full_name":"ameshkov/node-qunit-puppeteer","owner":"ameshkov","description":"A simple node module for running qunit tests with headless Chromium","archived":false,"fork":false,"pushed_at":"2025-04-03T06:19:00.000Z","size":335,"stargazers_count":19,"open_issues_count":7,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-02-26T18:58:31.460Z","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/ameshkov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2018-10-19T09:21:28.000Z","updated_at":"2025-04-03T06:18:31.000Z","dependencies_parsed_at":"2024-10-26T21:13:02.428Z","dependency_job_id":"a12f32da-20dc-484f-a656-fc0ab438bcee","html_url":"https://github.com/ameshkov/node-qunit-puppeteer","commit_stats":{"total_commits":46,"total_committers":7,"mean_commits":6.571428571428571,"dds":"0.26086956521739135","last_synced_commit":"6e8ad36c57aa4ef3bd350e7c8eb370c729b4ce4e"},"previous_names":["ameshkov/qunit-puppeteer-runner"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/ameshkov/node-qunit-puppeteer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameshkov%2Fnode-qunit-puppeteer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameshkov%2Fnode-qunit-puppeteer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameshkov%2Fnode-qunit-puppeteer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameshkov%2Fnode-qunit-puppeteer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ameshkov","download_url":"https://codeload.github.com/ameshkov/node-qunit-puppeteer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameshkov%2Fnode-qunit-puppeteer/sbom","scorecard":{"id":189181,"data":{"date":"2025-08-11","repo":{"name":"github.com/ameshkov/node-qunit-puppeteer","commit":"bfbdf1797da9f73de7d3cff5b3cc2b3c2f622ef8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":2,"reason":"Found 5/17 approved changesets -- score normalized to 2","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test.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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/ameshkov/node-qunit-puppeteer/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/ameshkov/node-qunit-puppeteer/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/ameshkov/node-qunit-puppeteer/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ameshkov/node-qunit-puppeteer/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/ameshkov/node-qunit-puppeteer/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/ameshkov/node-qunit-puppeteer/test.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction 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":"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":"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"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yml:13"],"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 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":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T20:18:41.229Z","repository_id":33165044,"created_at":"2025-08-16T20:18:41.229Z","updated_at":"2025-08-16T20:18:41.229Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-13T07:09:46.514Z","updated_at":"2026-03-07T02:32:54.726Z","avatar_url":"https://github.com/ameshkov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node QUnit Puppeteer Plugin\n\n[![NPM](https://nodei.co/npm/node-qunit-puppeteer.png?compact=true)](https://nodei.co/npm/node-qunit-puppeteer/)\n\n\u003e A simple node module for running qunit tests with [headless Chromium](https://github.com/GoogleChrome/puppeteer).\n\nThere is a common issue with PhantomJS failing with ES6 code,\nand the logical solution is to use Chrome Puppeteer instead.\n\n## Development\n\n\u003e Make sure you have installed [Node.js] v22 or later\n\u003e and [pnpm] v10 or later.\n\n### Install dependencies\n\n```bash\npnpm install\n```\n\n### Run tests\n\n```bash\npnpm test\n```\n\n### Run linter\n\n```bash\npnpm lint\n```\n\n[Node.js]: https://nodejs.org/en/download\n[pnpm]: https://pnpm.io/installation\n\n## Usage\n\n### Command-line utility\n\n```bash\nnpm install -g node-qunit-puppeteer\nnode-qunit-puppeteer \u003cURL\u003e [\u003ctimeout\u003e] [\u003cpuppeteerArgs\u003e]\n```\n\n- `\u003cURL\u003e` — the address (or filepath) of the qunit HTML test page.\n- `\u003ctimeout\u003e` — (optional) test run timeout in milliseconds. Default is 30000.\n- `\u003cpuppeteerArgs\u003e` — (optional) Chrome command-line arguments. Default is \"--allow-file-access-from-files\".\n\n#### Examples\n\n`node-qunit-puppeteer https://example.org/ 10000 \"--allow-file-access-from-files --no-sandbox\"`\n`node-qunit-puppeteer ./test/test-runner.html 10000 \"--allow-file-access-from-files --no-sandbox\"`\n\n### Node module\n\n- npm: `npm install node-qunit-puppeteer --save-dev`\n- yarn: `yarn add node-qunit-puppeteer --dev`\n- pnpm: `pnpm add node-qunit-puppeteer --save-dev`\n\n#### Exported functions\n\n- `async function runQunitPuppeteer(qunitPuppeteerArgs)` — opens the specified HTML page in a Chromium puppeteer\n  and captures results of a test run. Returns an object with information on every module/test run.\n- `function printOutput(qunitResult, console)` — takes the output of runQunitPuppeteer and prints it to console\n  with indentation and colors.\n- `function printResultSummary(qunitResult, console)` — takes the output of runQunitPuppeteer\n  and prints a summary to console with indentation and colors.\n- `function printFailedTests(qunitResult, console)` — takes the output of runQunitPuppeteer\n  and prints failed test(s) information to console with indentation and colors.\n- `async function runQunitWithBrowser(browser, qunitPuppeteerArgs)` — runs the specified HTML page\n  in the `puppeteer.Browser` instance. You might want to use this if you need to use a different puppeteer version\n  or if you need to apply some additional logic on top of it.\n- `async function runQunitWithPage(page, qunitPuppeteerArgs)` — runs the specified HTML page\n  in the `puppeteer.Page` instance. Just like the previous function,\n  you may want to use it if you need to use a different puppeteer version.\n\n#### Examples\n\n```javascript\nconst path = require(\"path\");\nconst { runQunitPuppeteer, printOutput } = require(\"node-qunit-puppeteer\");\n\nconst qunitArgs = {\n  // Path to qunit tests suite\n  targetUrl: `file://${path.join(__dirname, \"tests.html\")}`,\n  // (optional, 30000 by default) global timeout for the tests suite\n  timeout: 10000,\n  // (optional, false by default) should the browser console be redirected or not\n  redirectConsole: true,\n  // (optional, ['--allow-file-access-from-files'] by default) Chrome command-line arguments\n  puppeteerArgs: [\"--allow-file-access-from-files\"]\n};\n\nrunQunitPuppeteer(qunitArgs)\n  .then(result =\u003e {\n    // Print the test result to the output\n    printOutput(result, console);\n    if (result.stats.failed \u003e 0) {\n      // Handle the failed test run\n    }\n  })\n  .catch(ex =\u003e {\n    console.error(ex);\n  });\n```\n\n```javascript\nconst path = require(\"path\");\nconst {\n  runQunitPuppeteer,\n  printResultSummary,\n  printFailedTests\n} = require(\"node-qunit-puppeteer\");\n\nconst qunitArgs = {\n  // Path to qunit tests suite\n  targetUrl: `file://${path.join(__dirname, \"tests.html\")}`,\n  // (optional, 30000 by default) global timeout for the tests suite\n  timeout: 10000,\n  // (optional, false by default) should the browser console be redirected or not\n  redirectConsole: true\n};\n\nrunQunitPuppeteer(qunitArgs)\n  .then(result =\u003e {\n    printResultSummary(result, console);\n\n    if (result.stats.failed \u003e 0) {\n      printFailedTests(result, console);\n      // other action(s) on failed tests\n    }\n  })\n  .catch(ex =\u003e {\n    console.error(ex);\n  });\n```\n\n## Output\n\n\u003cimg width=\"499\" style=\"border: 1px solid #efefef\" src=\"https://user-images.githubusercontent.com/5947035/47224776-0888c800-d3c5-11e8-9364-6d6f1d4b3bd1.png\"\u003e\n\n## `result` object\n\n```json\n{\n  \"modules\": {\n    \"module 1\": {\n      \"name\": \"module 1\",\n      \"tests\": [\n        {\n          \"name\": \"module 1 simple test 1\",\n          \"testId\": \"49b931ed\",\n          \"skip\": false,\n          \"module\": \"module 1\",\n          \"previousFailure\": false,\n          \"log\": [\n            {\n              \"module\": \"module 1\",\n              \"name\": \"module 1 simple test 1\",\n              \"result\": true,\n              \"message\": \"Passed 1!\",\n              \"actual\": true,\n              \"testId\": \"49b931ed\",\n              \"negative\": false,\n              \"runtime\": 1,\n              \"todo\": false,\n              \"expected\": true\n            },\n            {\n              \"module\": \"module 1\",\n              \"name\": \"module 1 simple test 1\",\n              \"result\": true,\n              \"message\": \"Passed 2!\",\n              \"actual\": true,\n              \"testId\": \"49b931ed\",\n              \"negative\": false,\n              \"runtime\": 2,\n              \"todo\": false,\n              \"expected\": true\n            }\n          ],\n          \"skipped\": false,\n          \"todo\": false,\n          \"failed\": 0,\n          \"passed\": 2,\n          \"total\": 2,\n          \"runtime\": 3,\n          \"assertions\": [\n            {\n              \"result\": true,\n              \"message\": \"Passed 1!\"\n            },\n            {\n              \"result\": true,\n              \"message\": \"Passed 2!\"\n            }\n          ],\n          \"source\": \"    at file:///Users/..../test-runner.html:17:11\"\n        }\n      ],\n      \"failed\": 0,\n      \"passed\": 2,\n      \"runtime\": 3,\n      \"total\": 2\n    },\n    \"module 2\": {\n      \"name\": \"module 2\",\n      \"tests\": [\n        {\n          \"name\": \"module 2 simple test 2\",\n          \"testId\": \"9f962b0e\",\n          \"skip\": false,\n          \"module\": \"module 2\",\n          \"previousFailure\": false,\n          \"log\": [\n            {\n              \"module\": \"module 2\",\n              \"name\": \"module 2 simple test 2\",\n              \"result\": true,\n              \"message\": \"Passed 1!\",\n              \"actual\": true,\n              \"testId\": \"9f962b0e\",\n              \"negative\": false,\n              \"runtime\": 0,\n              \"todo\": false,\n              \"expected\": true\n            }\n          ],\n          \"skipped\": false,\n          \"todo\": false,\n          \"failed\": 0,\n          \"passed\": 1,\n          \"total\": 1,\n          \"runtime\": 0,\n          \"assertions\": [\n            {\n              \"result\": true,\n              \"message\": \"Passed 1!\"\n            }\n          ],\n          \"source\": \"    at file:///Users/..../test-runner.html:23:11\"\n        },\n        {\n          \"name\": \"module 2 failed test 1\",\n          \"testId\": \"aae8e622\",\n          \"skip\": false,\n          \"module\": \"module 2\",\n          \"previousFailure\": false,\n          \"log\": [\n            {\n              \"module\": \"module 2\",\n              \"name\": \"module 2 failed test 1\",\n              \"result\": false,\n              \"message\": \"Passed 1!\",\n              \"actual\": false,\n              \"testId\": \"aae8e622\",\n              \"negative\": false,\n              \"runtime\": 0,\n              \"todo\": false,\n              \"expected\": true,\n              \"source\": \"    at Object.\u003canonymous\u003e (file:///Users/..../test-runner.html:28:14)\"\n            }\n          ],\n          \"skipped\": false,\n          \"todo\": false,\n          \"failed\": 1,\n          \"passed\": 0,\n          \"total\": 1,\n          \"runtime\": 1,\n          \"assertions\": [\n            {\n              \"result\": false,\n              \"message\": \"Passed 1!\"\n            }\n          ],\n          \"source\": \"    at file:///Users/..../test-runner.html:27:11\"\n        }\n      ],\n      \"failed\": 1,\n      \"passed\": 1,\n      \"runtime\": 2,\n      \"total\": 2\n    }\n  },\n  \"totalTests\": 3,\n  \"stats\": {\n    \"passed\": 3,\n    \"failed\": 1,\n    \"total\": 4,\n    \"runtime\": 35\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fameshkov%2Fnode-qunit-puppeteer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fameshkov%2Fnode-qunit-puppeteer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fameshkov%2Fnode-qunit-puppeteer/lists"}