{"id":47712930,"url":"https://github.com/taktakpeops/jest-environment-browserstack","last_synced_at":"2026-04-02T18:41:40.889Z","repository":{"id":35134322,"uuid":"211088866","full_name":"taktakpeops/jest-environment-browserstack","owner":"taktakpeops","description":"A Jest environment for using Browserstack and Browserstack-Local with Webdriver-manager","archived":false,"fork":false,"pushed_at":"2023-01-16T05:23:44.000Z","size":1442,"stargazers_count":9,"open_issues_count":23,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-17T03:18:01.270Z","etag":null,"topics":["browserstack","browserstack-environment","browserstack-local","javascript","jest","jest-environment","nodejs","test-automation","visual-tests"],"latest_commit_sha":null,"homepage":null,"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/taktakpeops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-09-26T12:55:07.000Z","updated_at":"2025-03-04T12:50:11.000Z","dependencies_parsed_at":"2023-01-16T22:23:11.522Z","dependency_job_id":null,"html_url":"https://github.com/taktakpeops/jest-environment-browserstack","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/taktakpeops/jest-environment-browserstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taktakpeops%2Fjest-environment-browserstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taktakpeops%2Fjest-environment-browserstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taktakpeops%2Fjest-environment-browserstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taktakpeops%2Fjest-environment-browserstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taktakpeops","download_url":"https://codeload.github.com/taktakpeops/jest-environment-browserstack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taktakpeops%2Fjest-environment-browserstack/sbom","scorecard":{"id":866526,"data":{"date":"2025-08-11","repo":{"name":"github.com/taktakpeops/jest-environment-browserstack","commit":"e6d725f4e9a1477aeae2ce057cd472919ee09d89"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/15 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":"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":"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":0,"reason":"dangerous workflow patterns detected","details":["Warn: untrusted code checkout '${{ github.event.pull_request.head.sha }}': .github/workflows/dependabot.yml:14"],"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/branches.yml:1","Warn: no topLevel permission defined: .github/workflows/dependabot.yml:1","Warn: no topLevel permission defined: .github/workflows/master.yaml: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":"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/branches.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/branches.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/branches.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/branches.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/branches.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/branches.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/branches.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/branches.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/branches.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/branches.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/branches.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/branches.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependabot.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/dependabot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependabot.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/dependabot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependabot.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/dependabot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:76: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:115: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:117: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yaml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/taktakpeops/jest-environment-browserstack/master.yaml/master?enable=pin","Info:   0 out of  21 GitHub-owned 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.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md: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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 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":0,"reason":"81 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-36fh-84j7-cv5h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","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-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7"],"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-24T02:48:16.824Z","repository_id":35134322,"created_at":"2025-08-24T02:48:16.825Z","updated_at":"2025-08-24T02:48:16.825Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["browserstack","browserstack-environment","browserstack-local","javascript","jest","jest-environment","nodejs","test-automation","visual-tests"],"created_at":"2026-04-02T18:41:35.968Z","updated_at":"2026-04-02T18:41:40.882Z","avatar_url":"https://github.com/taktakpeops.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jest-environment-browserstack\n\n![master](https://github.com/taktakpeops/jest-environment-browserstack/workflows/master/badge.svg) [![npm version](http://img.shields.io/npm/v/jest-environment-browserstack.svg?style=flat)](https://npmjs.org/package/jest-environment-browserstack 'View this project on npm') [![Codacy Badge](https://api.codacy.com/project/badge/Grade/7b1839cead7743a69be711dd6c1c022c)](https://www.codacy.com/manual/taktakpeops/jest-environment-browserstack?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=taktakpeops/jest-environment-browserstack\u0026utm_campaign=Badge_Grade) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\nUse Jest as test-runner for running your visual-tests and more using Browserstack.\n\n## What is it\n\nThis mono-repository has currently 3 packages:\n\n- [core](https://github.com/taktakpeops/jest-environment-browserstack/tree/master/packages/core): the Jest environment taking care of making Browserstack available in your specs files\n- [plugins](https://github.com/taktakpeops/jest-environment-browserstack/tree/master/packages/plugins): contains types and abstract classes for creating a new plugin\n- [selenium-webdriver](https://github.com/taktakpeops/jest-environment-browserstack/tree/master/packages/selenium-webdriver): plugin wrapping [`selenium-webdriver`](https://www.npmjs.com/package/selenium-webdriver)\n\n### Why a plugin system\n\nWith the Webdriver API becoming a W3C standard, more and more implementation of clients for interacting with the API are appearing. Instead of imposing an implementation over an other, the plugin system allows users to use their favorite client easily.\n\n## Usage\n\nFor using this environment, run first the following command in your terminal:\n\n```bash\nnpm install --save-dev jest-environment-browserstack @jest-environment-browserstack/selenium-webdriver\n```\n\nOnce it's done, configure your Jest config.\n\n### Browserstack\n\nAssuming your configuration is defined in your `package.json`, add the following lines to your `globals` definition:\n\n```json\n{\n  \"jest\": {\n    \"preset\": \"ts-jest\",\n    \"testEnvironment\": \"browserstack\",\n    \"globals\": {\n      \"browserstack\": {\n        \"driver\": \"@jest-environment-browserstack/selenium-webdriver\",\n        \"capabilities\": {\n          \"browserName\": \"chrome\",\n          \"browserVersion\": \"76.0\",\n          \"bstack:options\": {\n            \"os\": \"Windows\",\n            \"osVersion\": \"10\",\n            \"userName\": \"myUsername\",\n            \"accessKey\": \"myAccessKey\",\n            \"buildName\": \"myBuild\",\n            \"sessionName\": \"mySessionName\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n### Browserstack Local\n\nAssuming here also your configuration is defined in your `package.json`, add the following lines to your `globals` definition:\n\n```json\n{\n  \"jest\": {\n    \"preset\": \"ts-jest\",\n    \"testEnvironment\": \"browserstack\",\n    \"globals\": {\n      \"browserstack\": {\n        \"driver\": \"@jest-environment-browserstack/selenium-webdriver\",\n        \"capabilities\": {\n          \"browserName\": \"chrome\",\n          \"browserVersion\": \"76.0\",\n          \"bstack:options\": {\n            \"os\": \"Windows\",\n            \"osVersion\": \"10\",\n            \"userName\": \"myUsername\",\n            \"accessKey\": \"myAccessKey\",\n            \"buildName\": \"myBuild\",\n            \"sessionName\": \"mySessionName\"\n          }\n        },\n        \"localTesting\": {\n          \"verbose\": true\n        }\n      }\n    }\n  }\n}\n```\n\n### Loading the environment using annotation\n\nIf you are running all your tests with JSDom as main environment, you can load the Browserstack environment for a specific file by adding a Jest annotation at the beginning of your file.\n\nHere is an example:\n\nmy-visual-test.spec.js:\n\n```javascript\n/**\n * @jest-environment browserstack\n */\nimport { By } from 'selenium-webdriver';\n\ndescribe('my visual test', () =\u003e {\n  let driver;\n\n  beforeAll(async () =\u003e {\n    // you can override the default configuration\n    driver = await global.__driver__({\n      'bstack:options': {\n        sessionName: 'my test',\n      },\n    });\n    driver.get('https://mysuperurl.ltd');\n  }, 20000); // this timeout is required because starting a session in Browserstack can take ages\n\n  afterAll(async () =\u003e {\n    // can be omitted\n    await driver.quit();\n  });\n\n  it('test something', async () =\u003e {\n    const myElement = await driver.findElement(By.css('.super.class'));\n    const text = await myElement.getText();\n    expect(text).toBe('super text');\n  });\n});\n```\n\n### Credentials\n\nIf you aren't willing to put your credentials in your `package.json` file, you can export in your environment `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY`. If you do so, `userName` and `accessKey` can be omitted.\n\n## Examples\n\nTwo examples are available:\n\n- [basic usage](https://github.com/taktakpeops/jest-environment-browserstack/tree/master/examples/basic-usage): a test loading the GitHub page of this repository and making some assertions\n- [with Browserstack local](https://github.com/taktakpeops/jest-environment-browserstack/tree/master/examples/with-bs-local): an example made with create-react-app including visual test and ui-test\n\n## Known limitations\n\nThe screenshot API from Browserstack is not implemented yet.\nThe npm package `selenium-webdriver` is still an alpha version (4.0.0-alpha5)\n\n## Bug and more\n\nFeel free to open an issue on GitHub or to contribute by opening a pull-request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaktakpeops%2Fjest-environment-browserstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaktakpeops%2Fjest-environment-browserstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaktakpeops%2Fjest-environment-browserstack/lists"}