Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 1.66 KB

CONTRIBUTING.md

File metadata and controls

37 lines (21 loc) · 1.66 KB

Developing and contributing to claudia-bot-builder

Folder structure

The main body of code is in the lib directory. Each separate bot type should be in its own sub-directory, and the main bot-builder.js class should only be used to set up wiring for the bots.

The tests are in the spec directory, and should follow the structure of the corresponding source files. All executable test file names should end with -spec, so they will be automatically picked up by npm test. Any additional project files, helper classes etc that must not be directly executed by the test runner should not end with -spec. You can use the spec/helpers directory to store Jasmine helpers, that will be loaded before any test is executed.

Running tests

We use Jasmine for unit and integration tests. Unless there is a very compelling reason to use something different, please continue using Jasmine for tests. The existing tests are in the spec folder. Here are some useful command shortcuts:

Run all the tests:

npm test

Run only some tests:

npm test -- filter=prefix

Get detailed hierarchical test name reporting:

npm test -- full

Before submitting a pull request

AWS Lambda currently supports Node.js 4.3.2. Please run your tests using that version before submitting a pull request to ensure compatibility.

We use ESLint for syntax consistency, and the linting rules are included in this repository. Running npm test will check the linting rules as well. Please make sure your code has no linting errors before submitting a pull request.