You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+13-12Lines changed: 13 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson).
7
7
8
8
# Code
9
9
10
-
* Our style guide is based on [Google's](https://google.github.io/styleguide/jsguide.html), most of it is automaticaly enforced (and can be automatically applied with `npm run autofix`)
10
+
* Our style guide is based on [Google's](https://google.github.io/styleguide/jsguide.html), most of it is automaticaly enforced (and can be automatically applied with `npm run tslint:fix` or `npm run eslint:fix`)
11
11
* Commits should follow the [Angular commit message guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines). This is because our release tool uses this format for determining release versions and generating changelogs. To make this easier, we recommend using the [Commitizen CLI](https://github.com/commitizen/cz-cli) with the `cz-conventional-changelog` adapter.
12
12
13
13
# Issues
@@ -22,12 +22,16 @@ already encountered this issue.
22
22
If you want to contribute to the repository, follow these steps:
23
23
24
24
1. Fork the repo.
25
-
2. Develop and test your code changes: `npm install -d && npm test`.
25
+
2. Install dependencies: `npm install`
26
+
3. Build the code: `npm run build`
27
+
4. Verify the build before beginning your changes: `npm run test-unit`
28
+
2. Develop and test your code changes.
26
29
3. Travis-CI will run the tests for all services once your changes are merged.
27
30
4. Add a test for your changes. Only refactoring and documentation changes require no new tests.
28
31
5. Make the test pass.
29
-
6. Commit your changes.
32
+
6. Commit your changes. Remember the follow the correct commit message guidelines.
30
33
7. Push to your fork and submit a pull request.
34
+
8. Be sure to sign the CLA.
31
35
32
36
# Developer's Certificate of Origin 1.1
33
37
@@ -57,18 +61,15 @@ By making a contribution to this project, I certify that:
57
61
58
62
## Tests
59
63
60
-
Ideally, we'd like to see both unit and innervation tests on each method.
61
-
(Unit tests do not actually connect to the Watson service, integration tests do.)
64
+
Out of the box, `npm test` runs linting, unit tests, and integration tests (which require credentials). To run only the unit tests (sufficient for most cases), use `npm run test-unit`.
62
65
63
-
Out of the box, `npm test` runs linting and unit tests, but skips the integration tests,
64
-
because they require credentials.
65
-
66
-
To run integration tests, copy `test/resources/auth.example.js` to `test/resources/auth.js` and fill in credentials for
67
-
the service(s) you wish to test.
66
+
To run integration tests, copy `test/resources/auth.example.js` to `test/resources/auth.js` and fill in credentials for the service(s) you wish to test.
68
67
69
68
Currently this enables integration tests for all services so, unless all credentials are supplied, some tests will fail.
70
69
(This will be improved eventually.)
71
70
72
-
To run only specific tests, pass the file name to mocha. For example:
71
+
To run only specific tests, pass the file name to `jest`. For example:
0 commit comments