1 | # Contributing
|
2 |
|
3 | Please check out and build arangojs from source:
|
4 |
|
5 | ```sh
|
6 | git clone https://github.com/arangodb/arangojs.git
|
7 | cd arangojs
|
8 | npm install
|
9 | npm run build
|
10 | ```
|
11 |
|
12 | ## Testing
|
13 |
|
14 | Run the tests using the `npm test` or `yarn test` commands:
|
15 |
|
16 | ```sh
|
17 | npm test
|
18 | # - or -
|
19 | yarn test
|
20 | ```
|
21 |
|
22 | By default the tests will be run against a server listening on
|
23 | `http://127.0.0.1:8529` (using username `root` with no password). To
|
24 | override this, you can set the environment variable `TEST_ARANGODB_URL` to
|
25 | something different:
|
26 |
|
27 | ```sh
|
28 | TEST_ARANGODB_URL=http://myserver.local:8530 npm test
|
29 | # - or -
|
30 | TEST_ARANGODB_URL=http://myserver.local:8530 yarn test
|
31 | ```
|
32 |
|
33 | To run tests against a cluster, you can use multiple comma-separated URLs or
|
34 | append a comma to the URL. The tests will automatically attempt to acquire a
|
35 | host list and use round robin load balancing.
|
36 |
|
37 | For development arangojs tracks the development build of ArangoDB. This means
|
38 | tests may reflect behavior that does not match any existing public release of
|
39 | ArangoDB.
|
40 |
|
41 | To run tests for a specific release of ArangoDB other than the latest
|
42 | development build, use the environment variable `ARANGO_VERSION`, e.g. for 3.3:
|
43 |
|
44 | ```sh
|
45 | ARANGO_VERSION=30300 npm test
|
46 | # - or -
|
47 | ARANGO_VERSION=30300 yarn test
|
48 | ```
|
49 |
|
50 | The value follows the same format as the `arangoVersion` config option,
|
51 | i.e. XYYZZ where X is the major version, YY is the two digit minor version
|
52 | and ZZ is the two digit patch version (both zero filled to two digits).
|
53 |
|
54 | Any incompatible tests will appear as skipped (not failed) in the test result.
|
55 |
|
56 | ## Releases
|
57 |
|
58 | Releases of arangojs are manually
|
59 | [published on NPM](https://www.npmjs.com/package/arangojs).
|
60 |
|
61 | Releases can only be published by authorized ArangoDB staff.
|
62 | For more information see the internal documentation on
|
63 | [Releasing ArangoJS](https://github.com/arangodb/documents/blob/2a5f7c7/Driver/JavaScript/ReleasingArangojs.md).
|