{"id":15046984,"url":"https://github.com/jvdieten/playwright-mocha","last_synced_at":"2026-02-17T05:01:57.846Z","repository":{"id":57325900,"uuid":"362604861","full_name":"jvdieten/playwright-mocha","owner":"jvdieten","description":"Super lightweight playwright mocha test framework. CLI included and parallel test support.","archived":false,"fork":false,"pushed_at":"2021-06-18T20:28:07.000Z","size":443,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-16T22:07:45.374Z","etag":null,"topics":["automation-framework","automation-test","mocha","playwright","playwright-mocha","test","testing","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jvdieten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-28T20:59:30.000Z","updated_at":"2021-06-28T12:53:40.000Z","dependencies_parsed_at":"2022-08-31T20:10:58.646Z","dependency_job_id":null,"html_url":"https://github.com/jvdieten/playwright-mocha","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jvdieten/playwright-mocha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvdieten%2Fplaywright-mocha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvdieten%2Fplaywright-mocha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvdieten%2Fplaywright-mocha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvdieten%2Fplaywright-mocha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jvdieten","download_url":"https://codeload.github.com/jvdieten/playwright-mocha/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvdieten%2Fplaywright-mocha/sbom","scorecard":{"id":544738,"data":{"date":"2025-08-11","repo":{"name":"github.com/jvdieten/playwright-mocha","commit":"d6ae6ade13021f30647c3d9d9801f2517370af7e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-xvf7-4v9q-58w6","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-20T09:11:51.515Z","repository_id":57325900,"created_at":"2025-08-20T09:11:51.515Z","updated_at":"2025-08-20T09:11:51.515Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29534447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T05:00:25.817Z","status":"ssl_error","status_checked_at":"2026-02-17T04:57:16.126Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["automation-framework","automation-test","mocha","playwright","playwright-mocha","test","testing","testing-tools"],"created_at":"2024-09-24T20:53:50.239Z","updated_at":"2026-02-17T05:01:57.709Z","avatar_url":"https://github.com/jvdieten.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# playwright-mocha\n\n\u003c!-- badges: start --\u003e\n[![NPM](https://nodei.co/npm/playwright-mocha.png)](https://npmjs.org/package/playwright-mocha)\n\u003c!-- badges: end --\u003e\n\nThe aim of playwright-mocha is to deliver a lightweight test-framework that is combining the power of [mocha](https://mochajs.org/) and [playwright](https://playwright.dev/). You should be able to use all configuration options you can provide via mocha or playwright. If you miss something raise an issue or open a pull request.\n\n\n## Installation and configuration via CLI\n\n\u003cbr\u003e\n\nTo install the framework:\n\n`npm install playwright-mocha`\n\n\u003cbr\u003e\n\nTo run:\n\n`npx playwright-mocha`\n\nIf no configuration file is found the CLI is automatically activated to setup the file via the CLI.\n\n![](.images/cli.png)\n\n## Create test \n\nExample\n\n```javascript\nconst assert = require('assert');\nconst { PlaywrightMocha } = require('playwright-mocha/dist/pm');\n\nit('checks the title of the page', async () =\u003e {\n\n  const page = PlaywrightMocha.page();\n\n  await page.goto('https://www.headlesstesting.com/');\n  const title = await page.title();\n  assert.strictEqual(title, 'Headless Testing with Puppeteer and Playwright in the Cloud.');\n})\n```\n\n## Advanced configuration\n\nThe only thing you need now is a configuration file the paramaters browser and testFilesBaseDir are custom framework paramaters the rest of the paramaters are 1:1 mapped to specific playwright or mocha options.\n\n| Name      | options |\n| ----------- | ----------- |\n| browser      | firefox/chromium/webkit       |\n| testFilesBaseDir | relative path to your folder containing the test files |\n| playwrightLaunchOptions   | https://playwright.dev/docs/api/class-browsertype?_highlight=launch#browsertypelaunchoptions        |\n| playwrightContextOptions | https://playwright.dev/docs/api/class-browser?_highlight=context\u0026_highlight=op#browsernewcontextoptions |\n| mochaOptions | https://mochajs.org/api/mocha |\n\n\u003cbr\u003e\n \n## Parallel execution\n\nThe framework supports parallel execution for each test/spec file. \nTo enable this feature you can add the following lines to the \"mochaOptions\" in the configuration file.\n\n```json\n    \"require\": [\"node_modules/playwright-mocha/dist/hooks.js\"],\n    \"parallel\": true\n```\n\n\n### example config with parallel execution\n```json \n{\n  \"browser\": \"firefox\",\n  \"testFilesBaseDir\": \"examples\",\n  \"playwrightLaunchOptions\": {\n    \"headless\": false\n  },\n  \"playwrightContextOptions\": {\n\n    \"viewport\": {\n      \"width\": 1600,\n      \"height\": 1000\n    },\n    \"recordVideo\": {\n      \"dir\": \"video\"\n    }\n  },\n  \"mochaOptions\": {\n    \"timeout\": 30000,\n    \"require\": [\"node_modules/playwright-mocha/dist/hooks.js\"],\n    \"parallel\": true\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvdieten%2Fplaywright-mocha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjvdieten%2Fplaywright-mocha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvdieten%2Fplaywright-mocha/lists"}