Skip to content

Latest commit

 

History

History
87 lines (65 loc) · 3.85 KB

CONTRIBUTING.md

File metadata and controls

87 lines (65 loc) · 3.85 KB

Welcome 💖

Before anything else, thank you for taking some of your precious time to help this project move forward. ❤️

If you're new to open source and feeling a bit nervous 😳, we understand! We recommend watching this excellent guide to give you a grounding in some of the basic concepts. We want you to feel safe to make mistakes, and ask questions.

If anything in this guide or anywhere else in the codebase doesn't make sense to you, please let us know! It's through your feedback that we can make this codebase more welcoming, so we'll be glad to hear thoughts.

You can chat with us in the #committers channel in our Community Discord, or feel free to raise an issue if you're experiencing any friction trying make your contribution.

Local setup

To get a local development environment:

  • use Git to fork and clone the repo
  • If you're running Windows, make sure to enable Developer Mode
  • install Node.Js
  • Make sure you have a recent version of npm installed: npm install -g npm
  • npm install - Install dependencies
  • npm test - Compile typescript and run the tests

If everything passes, you're ready to hack! ⛏

Tests

Type npm run or see the package.json scripts section for how to run each category of tests.

Exports

The functionality exposed under both the @cucumber/cucumber and @cucumber/cucumber/api entry points is analysed and has a report generated by API Extractor. If you make a change that affects the exported API surface, you'll need to run npm run exports-update to run the analysis and regenerate the file, and commit the changes. If you forget to do this locally, the CI build will fail and remind you.

Internals

Project Structure

└── src
    │
    ├── api                   # main runCucumber function etc
    │
    ├── cli                   # executing from argv
    │
    ├── configuration         # loading, merging, validating configuration
    │
    ├── formatter             # displaying the results
    │
    ├── models                # data structures
    │
    ├── runtime               # run test cases, emits the event protocol
    │
    └── support_code_library  # load hooks / step definitions

The runtime emits events with an EventEmitter

Coding style

  • Promises and ES7 async/await
  • Try to make things as unit testable as possible. If it's hard to unit test, the class/function may be doing too much.

Changelog

  • Every PR should have a changelog entry
  • The contributor should update the changelog
  • Each entry in the changelog should include a link to the relevant issues/PRs