@@ -7,33 +7,11 @@ which is hosted by [Confluent Inc.](https://github.com/confluentinc)
77on GitHub. This document lists rules, guidelines, and help getting started,
88so if you feel something is missing feel free to send a pull request.
99
10- #### Table Of Contents
11-
12- [ What should I know before I get started?] ( #what-should-i-know-before-i-get-started )
13- * [ Contributor Agreement] ( #contributor-agreement )
14-
15- [ How Can I Contribute?] ( #how-can-i-contribute )
16- * [ Reporting Bugs] ( #reporting-bugs )
17- * [ Suggesting Enhancements] ( #suggesting-enhancements )
18- * [ Pull Requests] ( #pull-requests )
19-
20- [ Styleguides] ( #styleguides )
21- * [ Git Commit Messages] ( #git-commit-messages )
22- * [ JavaScript Styleguide] ( #javascript-styleguide )
23- * [ C++ Styleguide] ( #c++-styleguide )
24- * [ Specs Styleguide] ( #specs-styleguide )
25- * [ Documentation Styleguide] ( #documentation-styleguide )
26-
27- [ Debugging] ( #debugging )
28- * [ Debugging C++] ( #debugging-c )
29-
30- [ Updating librdkafka version] ( #updating-librdkafka-version )
31-
3210## What should I know before I get started?
3311
3412### Contributor Agreement
3513
36- Not currently required .
14+ Required (please follow instructions after making any Pull Requests) .
3715
3816## How can I contribute?
3917
@@ -49,6 +27,10 @@ replicas, partitions, and brokers you are connecting to, because some issues
4927might be related to Kafka. A list of ` librdkafka ` configuration key-value pairs
5028also helps.
5129
30+ Adding the property ` debug ` in your ` librdkafka ` configuration will help us. A list of
31+ possible values is available [ here] ( https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md ) ,
32+ but you can set it to ` all ` if verbose logs are okay.
33+
5234### Suggesting Enhancements
5335
5436Please use __ Github Issues__ to suggest enhancements. We are happy to consider
@@ -59,6 +41,9 @@ library's core.
5941
6042### Pull Requests
6143
44+ NOTE: Pull requests while the library in EA are discouraged, as we are still
45+ working on the API and may make breaking changes.
46+
6247* Include new test cases (either end-to-end or unit tests) with your change.
6348* Follow our style guides.
6449* Make sure all tests are still passing and the ` linter ` does not report any issues.
@@ -114,7 +99,8 @@ In short:
11499
115100### Specs Styleguide
116101
117- * Write all JavaScript tests by using the ` mocha ` testing framework.
102+ * Write JavaScript tests by using the ` mocha ` testing framework for the
103+ non-promisified API and ` jest ` for the promisified API.
118104* All ` mocha ` tests should use exports syntax.
119105* All ` mocha ` test files should be suffixed with ` .spec.js ` instead of ` .js ` .
120106* Unit tests should mirror the JavaScript files they test (for example,
@@ -169,6 +155,26 @@ Using Visual Studio code to develop on `confluent-kafka-js`. If you use it you c
169155}
170156```
171157
158+ ## Tests
159+
160+ This project includes three types of tests in this project:
161+ * end-to-end integration tests (` mocha ` )
162+ * unit tests (` mocha ` )
163+ * integration tests for promisified API (` jest ` )
164+
165+ You can run all types of tests by using ` Makefile ` . Doing so calls ` mocha ` or ` jest ` in your locally installed ` node_modules ` directory.
166+
167+ * Before you run the tests, be sure to init and update the submodules:
168+ 1 . ` git submodule init `
169+ 2 . ` git submodule update `
170+ * To run the unit tests, you can run ` make lint ` or ` make test ` .
171+ * To run the promisified integration tests, you can use ` make promisified_test ` .
172+ You must have a running Kafka installation available. By default, the test tries to connect to ` localhost:9092 ` ;
173+ however, you can supply the ` KAFKA_HOST ` environment variable to override this default behavior.
174+ * To run the integration tests, you can use ` make e2e ` .
175+ You must have a running Kafka installation available. By default, the test tries to connect to ` localhost:9092 ` ;
176+ however, you can supply the ` KAFKA_HOST ` environment variable to override this default behavior. Run ` make e2e ` .
177+
172178## Debugging
173179
174180### Debugging C++
0 commit comments