Skip to content

Commit bd2ea87

Browse files
authored
docs: Improves explanations on Postgres testing (#3873)
* Update CONTRIBUTING.md * Update CONTRIBUTING.md
1 parent c2abbae commit bd2ea87

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,19 @@ We really want Parse to be yours, to see it grow and thrive in the open source c
1010
* Run the tests for the file you are working on with `npm test spec/MyFile.spec.js`
1111
* Run the tests for the whole project and look at the coverage report to make sure your tests are exhaustive by running `npm test` and looking at (project-root)/lcov-report/parse-server/FileUnderTest.js.html
1212
* Lint your code by running `npm run lint` to make sure all your code is not gonna be rejected by the CI.
13+
* Never publish the lib folder.
14+
15+
##### Run your tests against Postgres (optional)
16+
17+
If your pull request introduces a change that may affect the storage or retrieval of objects, you may want to make sure it plays nice with Postgres.
18+
19+
* Run the tests against the postgres database with `PARSE_SERVER_TEST_DB=postgres npm test`. You'll need to have postgres running on your machine and setup [appropriately](https://github.com/parse-community/parse-server/blob/master/.travis.yml#L37)
20+
* If your feature is intended to only work with MongoDB, you should disable PostgreSQL-specific tests with:
21+
22+
- `describe_only_db('mongo')` // will create a `describe` that runs only on mongoDB
23+
- `it_only_db('mongo')` // will make a test that only runs on mongo
24+
- `it_exclude_dbs(['postgres'])` // will make a test that runs against all DB's but postgres
1325

1426
##### Code of Conduct
1527

16-
This project adheres to the [Open Code of Conduct](http://todogroup.org/opencodeofconduct/#Parse Server/[email protected]). By participating, you are expected to honor this code.
28+
This project adheres to the [Contributor Covenant Code of Conduct](https://github.com/parse-community/parse-server/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to honor this code.

0 commit comments

Comments
 (0)