{"id":13393474,"url":"https://github.com/cucumber/cucumber-js","last_synced_at":"2026-04-12T11:01:13.632Z","repository":{"id":37444952,"uuid":"1811965","full_name":"cucumber/cucumber-js","owner":"cucumber","description":"Cucumber for JavaScript","archived":false,"fork":false,"pushed_at":"2025-05-08T17:48:07.000Z","size":28559,"stargazers_count":5137,"open_issues_count":63,"forks_count":1089,"subscribers_count":210,"default_branch":"main","last_synced_at":"2025-05-08T18:40:23.465Z","etag":null,"topics":["cucumber","javascript","typescript"],"latest_commit_sha":null,"homepage":"https://cucumber.io","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/cucumber.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support_files/api_reference.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"cucumber","github":"cucumber"}},"created_at":"2011-05-27T21:27:17.000Z","updated_at":"2025-05-07T10:35:39.000Z","dependencies_parsed_at":"2024-01-24T23:05:04.370Z","dependency_job_id":"1f130c3c-eda0-47c7-ac48-42ebce4d1b78","html_url":"https://github.com/cucumber/cucumber-js","commit_stats":{"total_commits":1878,"total_committers":196,"mean_commits":9.581632653061224,"dds":0.7566560170394037,"last_synced_commit":"edaf1c016ca862437836d2e6cf332e9a9afcfc95"},"previous_names":[],"tags_count":176,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cucumber%2Fcucumber-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cucumber%2Fcucumber-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cucumber%2Fcucumber-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cucumber%2Fcucumber-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cucumber","download_url":"https://codeload.github.com/cucumber/cucumber-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253671981,"owners_count":21945471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cucumber","javascript","typescript"],"created_at":"2024-07-30T17:00:53.785Z","updated_at":"2026-04-12T11:01:13.620Z","avatar_url":"https://github.com/cucumber.png","language":"TypeScript","funding_links":["https://opencollective.com/cucumber","https://github.com/sponsors/cucumber"],"categories":["Test runners","TypeScript","Tools, Libraries \u0026 Frameworks","Packages","Test","typescript","By Technology","Utility Libraries","Testing","Tools"],"sub_categories":["Test","IDE","JavaScript"],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"./docs/images/logo.svg\" alt=\"\" width=\"75\"\u003e\n  \u003cbr\u003e\n  Cucumber\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eAutomated tests in plain language, for Node.js\u003c/b\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@cucumber/cucumber\" style=\"text-decoration: none\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@cucumber/cucumber?style=flat\u0026color=dark-green\" alt=\"Latest version on npm\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/cucumber/cucumber-js/actions\" style=\"text-decoration: none\"\u003e\u003cimg src=\"https://github.com/cucumber/cucumber-js/actions/workflows/build.yml/badge.svg\" alt=\"Build status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/cucumber/cucumber-js?branch=master\" style=\"text-decoration: none\"\u003e\u003cimg src=\"https://coveralls.io/repos/github/cucumber/cucumber-js/badge.svg?branch=main\" alt=\"Coverage\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/cucumber\"\u003e\u003cimg src=\"https://opencollective.com/cucumber/backers/badge.svg\" alt=\"Backers\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/cucumber\"\u003e\u003cimg src=\"https://opencollective.com/cucumber/sponsors/badge.svg\" alt=\"Sponsors\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://vshymanskyy.github.io/StandWithUkraine\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg\" alt=\"Ukraine solidarity\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n[Cucumber](https://github.com/cucumber) is a tool for running automated tests written in plain language. Because they're\nwritten in plain language, they can be read by anyone on your team. Because they can be\nread by anyone, you can use them to help improve communication, collaboration and trust on\nyour team.\n\nThis is the JavaScript implementation of Cucumber. It runs on [maintained versions](https://github.com/nodejs/Release) of Node.js. You can [quickly try it via CodeSandbox](https://codesandbox.io/s/cucumber-js-demo-2p3vrl?file=/features/greeting.feature), or read on to get started locally in a couple of minutes.\n\nLooking to contribute? Read our [code of conduct](https://github.com/cucumber/.github/blob/main/CODE_OF_CONDUCT.md) first, then check the [contributing guide](./CONTRIBUTING.md) to get up and running.\n\n## Install\n\nCucumber is [available on npm](https://www.npmjs.com/package/@cucumber/cucumber):\n\n```shell\nnpm install @cucumber/cucumber\n```\n\n## Get Started\n\nLet's take this example of something to test:\n\n\nFirst, write your main code in `src/index.js`:\n\n```js\nclass Greeter {\n  sayHello() {\n    return 'hello'\n  }\n}\n\nmodule.exports = {\n  Greeter\n}\n```\n\nThen, write your feature in `features/greeting.feature`:\n\n```gherkin\nFeature: Greeting\n\n  Scenario: Say hello\n    When the greeter says hello\n    Then I should have heard \"hello\"\n```\n\nNext, implement your steps in `features/support/steps.js`:\n\n```js\nconst assert = require('assert')\nconst { When, Then } = require('@cucumber/cucumber')\nconst { Greeter } = require('../../src')\n\nWhen('the greeter says hello', function () {\n  this.whatIHeard = new Greeter().sayHello()\n});\n\nThen('I should have heard {string}', function (expectedResponse) {\n  assert.equal(this.whatIHeard, expectedResponse)\n});\n```\n\nFinally, run Cucumber:\n\n```shell\nnpx cucumber-js\n```\n\nAnd see the output:\n\n![Terminal output showing a successful test run with 1 scenario and 2 steps, all passing](./docs/images/readme-output.png)\n\nIf you learn best by example, we have [a repo with several example projects](https://github.com/cucumber/cucumber-js-examples), that might help you get going.\n\n## Documentation\n\nThe following documentation is for `main`, which might contain some unreleased features. See [documentation for older versions](./docs/older_versions.md) if you need it.\n\n* [Installation](./docs/installation.md)\n* [CLI](./docs/cli.md)\n* [Configuration](./docs/configuration.md)\n* Support Code\n  * [API Reference](./docs/support_files/api_reference.md)\n  * [Attachments](./docs/support_files/attachments.md)\n  * [Data Tables](./docs/support_files/data_table_interface.md)\n  * [Hooks](./docs/support_files/hooks.md)\n  * [Step Definitions](./docs/support_files/step_definitions.md)\n  * [Timeouts](./docs/support_files/timeouts.md)\n  * [World](./docs/support_files/world.md)\n* Guides\n  * [Debugging](./docs/debugging.md)\n  * [Dry run](./docs/dry_run.md)\n  * [ES Modules](./docs/esm.md)\n  * [Failing fast](./docs/fail_fast.md)\n  * [Filtering which scenarios run](./docs/filtering.md)\n  * [Formatters for feedback and reporting](./docs/formatters.md)\n  * [Parallel running for speed](./docs/parallel.md)\n  * [Plugins for extending functionality](./docs/plugins.md)\n  * [Profiles for composable configuration](./docs/profiles.md)\n  * [Rerunning just failures](./docs/rerun.md)\n  * [Retrying flaky scenarios](./docs/retry.md)\n  * [Sharding to split tests across machines](./docs/sharding.md)\n  * [JavaScript API for running programmatically](./docs/javascript_api.md)\n  * [Snippets for undefined steps](./docs/snippets.md)\n  * [Transpiling (from TypeScript etc)](./docs/transpiling.md)\n* [FAQ](./docs/faq.md)\n\n## Support\n\nSupport is [available from the community](https://cucumber.io/tools/cucumber-open/support/) if you need it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcucumber%2Fcucumber-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcucumber%2Fcucumber-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcucumber%2Fcucumber-js/lists"}