Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.67 KB

CONTRIBUTING.md

File metadata and controls

29 lines (18 loc) · 1.67 KB

Contributing to Benchmark.js

If you’d like to contribute a feature or bug fix, you can fork Benchmark.js, commit your changes, and send a pull request. Please make sure to search the issue tracker first; your issue may have already been discussed or fixed in master.

Tests

Include updated unit tests in the test directory as part of your pull request.

Before running the unit tests you’ll need to install, npm i, development dependencies. Run unit tests from the command-line via node test/test, or open test/index.html in a web browser.

The test/run-test.sh script attempts to run the tests in Rhino, RingoJS, PhantomJS, and Node, before running them in your default browser.

Coding Guidelines

In addition to the following guidelines, please follow the conventions already established in the code.

  • Spacing:
    Use two spaces for indentation. No tabs.

  • Naming:
    Keep variable and method names concise and descriptive.

  • Quotes:
    Single-quoted strings are preferred to double-quoted strings; however, please use a double-quoted string if the value contains a single-quote character to avoid unnecessary escaping.

  • Comments:
    Please use single-line comments to annotate significant additions, and JSDoc-style comments for new methods.